Help - Search - Members - Calendar
Full Version: Event walking from under player.
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
Armanic
I know how to make an event walk from under a player but for that special location, it can be accessed by 3 sides.

Is there a way to make it like:
If player comes from X1 Y1 event walks north
If player comes from X2 Y2 event walks south
If player comes from X3 Y3 event walks west

?

I'm looking through the options but I don't see anything close to that so I guess that if it's possible it might be some complicated coding lol.
Jens of Zanicuud
I'll give you a hint: set two variables as you can see here:

Variable[0001] = Player X
Variable[0001] -= This Event X


Variable[0002] = Player Y
Variable[0002] -= This Event Y


Variable[0001] will be lesser than zero if the player comes from the left, greater than zero if it comes from the right;
Variable[0002] will be lesser than zero if the player comes from above, greater than zero if it comes from below;

Put it in a couple of conditional branches and here you go smile.gif

I hope this can help, feel free to ask if I wasn't clear enough,

Jens
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.