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