how do i make a bullet move towards the mouse

Game Editor comments and discussion.

how do i make a bullet move towards the mouse

Postby master0500 » Sun Jul 10, 2011 10:24 pm

how do i make a bullet move towards the mouse
master0500
 
Posts: 409
Joined: Sun Jun 26, 2011 9:42 pm
Score: 27 Give a positive score

Re: how do i make a bullet move towards the mouse

Postby skydereign » Sun Jul 10, 2011 11:21 pm

Do you mean homing towards the mouse? Or it will move in the direction the mouse was in? I assume the latter, and to do that, do this.
bullet -> Create Actor -> Script Editor
Code: Select all
directional_velocity=10;
angle=direction(xscreen, yscreen, xmouse, ymouse);
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest