• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Direction problem. please help me to solve this direction

B

begjan

Guest
That direction is makes me so crazy :D. when obj_enemy facing downRight then it creating 2 sprites at same time. guys help me to solve it pls

else if (direction >= 337.5 && direction <22.5)
{
if alarm[2]
{
instance_create(x,y,obj_axe_right);
}
}

GIF.gif
 

wamingo

Member
This should never fire. A value can never be above 337.5 AND below 22.5 at the same time.
you need an 'or' instead of an 'and'
 
B

begjan

Guest
This should never fire. A value can never be above 337.5 AND below 22.5 at the same time.
you need an 'or' instead of an 'and'
Mate you saved me with your mighty Or from fire ^^
 
Top