

In my game their will be a spaceship that launches a rocket. So, how can I make it so whenever the user double taps the screen the rocket will fire in the direction of the tap?

timer=10;
if(timer>0)
{
CreateActor("rocket", "rocket_anim", "(none)", "(none)", player.x, player.y, true);
}
timer-=timer>0;
directional_velocity=20;
angle=direction(xscreen, xmouse, yscreen, ymouse);
Users browsing this forum: No registered users and 1 guest