• 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!

SOLVED turret problem

anima

Member
hello!
so im triying to make an TD game and i want the turret to slowly move and shoot at the enemy when it is facing it
and i cant do it
heres the code:
GML:
image_angle+=sin(degtorad(dir-image_angle)) *turspd
if image_angle=dir
&& mouse_check_button(mb_left){
   instance_create(x,y,obj_bala)
}
dir=point_direction(x,y,mouse_x,mouse_y)
 
Top