Page 1 of 1

Move To

PostPosted: Sat Sep 27, 2008 6:04 pm
by BlarghNRawr
is there an easier way to move an actor to a spot, instead of Move to?
because he keeps moving too fast and going through the platform...
i think its x=x and y=y, but i dont know exactly how to use them in a code

Re: Move To

PostPosted: Sat Sep 27, 2008 6:27 pm
by edh
BnR, you can control the speed of your move to in the dialog, or function call, too.

Here is an example for an actor named "myActor".

Code: Select all
myActor.x = xmouse;
myActor.y = ymouse;


You could put this in a left mouse button click event and the actor would appear where you click.

If you are doing it in myActors draw event, you could just say.

Code: Select all
x = xmouse;
y = ymouse;


If the actor is moving through a platform, perhaps you could adjust the move to coordinates. The actors 0,0 point is the upper left corner of the actor sprite. So, if the actor is always, say, 5 pixels too low, maybe you could move to (y - 5) or something.

Re: Move To

PostPosted: Sat Sep 27, 2008 8:28 pm
by edh
Also, could you select something in the "avoid" option of move to?

Re: Move To

PostPosted: Sat Sep 27, 2008 8:57 pm
by BlarghNRawr
yeah srry, i just realized i wuz telling my actor to move BELOW the platform :oops:
and thats why he was missing it :D
so im fine now