Move To

Non-platform specific questions.

Move To

Postby BlarghNRawr » Sat Sep 27, 2008 6:04 pm

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
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score

Re: Move To

Postby edh » Sat Sep 27, 2008 6:27 pm

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.
User avatar
edh
 
Posts: 233
Joined: Thu Sep 13, 2007 12:17 am
Location: Maine, USA
Score: 14 Give a positive score

Re: Move To

Postby edh » Sat Sep 27, 2008 8:28 pm

Also, could you select something in the "avoid" option of move to?
User avatar
edh
 
Posts: 233
Joined: Thu Sep 13, 2007 12:17 am
Location: Maine, USA
Score: 14 Give a positive score

Re: Move To

Postby BlarghNRawr » Sat Sep 27, 2008 8:57 pm

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
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron