how do u make an actor go towards the mouse slowly

Game Editor comments and discussion.

how do u make an actor go towards the mouse slowly

Postby DarkParadox » Mon Jun 25, 2007 8:30 pm

how do u make an actor go towards the mouse slowly?
User avatar
DarkParadox
 
Posts: 457
Joined: Mon Jan 08, 2007 11:32 pm
Location: USA, Florida.
Score: 84 Give a positive score

Postby d-soldier » Mon Jun 25, 2007 8:35 pm

In the actor's DRAW ACTOR script, use the "MOVE TO" function, in in the "relative to" box, select "MOUSE POSITION" and adjust the velocity as desired...
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Troodon » Mon Jun 25, 2007 8:48 pm

Will your actor never reach the mouse in your game?
If yes, put this in the collision event with the mouse:
xvelocity = 0;
yvelocity = 0;

Or it will start shaking when it reaches.
By the way, to use the MoveTo function, you need an actor mouse.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby d-soldier » Mon Jun 25, 2007 9:34 pm

Good call on the shaking actor thing there... but the move-to function allows "mouse position" which does not require a mouse actor.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Troodon » Mon Jun 25, 2007 9:41 pm

Cool, I don't know why but I never saw that before today! :shock:
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby d-soldier » Mon Jun 25, 2007 10:00 pm

You've been around for awhile, so maybe it came out within the last couple versions???
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Troodon » Tue Jun 26, 2007 8:05 am

No, I purchased the program 15 days after registering to these forums and have since used the same version 1.3.3 and it has the option. I guess I always knew what actor I'm seeking from the list, and that's why I didn't realise it. :wink:
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron