I'm trying to make it so that when a object is moved into the correct position the character can then activate a new event. I just can't figure out how to do it.
Location events
RPG Maker VXAce SupportUse a parallel process event to set two variables to the event's position, and then use conditional branches that check for the event's x to match the required spot, and for the y to be matched too.
that or when the object is moved (via events too right?) then make it activate a switch... then use that switch as a condition for your other event...
I'm trying to find a way to find the x and y but I don't know how to check the x and y
It's in Game Data of the Control Variables command.
Note you don't have to use a parallel process, you can just have it check the X and Y after the object is moved in the event itself.
Note you don't have to use a parallel process, you can just have it check the X and Y after the object is moved in the event itself.
Event-->Control Variable-->Game Data-->Character-->MapX/Y
not asking you to write it, but could you write a example, since i've done everything but I can't get it to work 🙁
You do not write that, it's the sequence how you click on it with the mouse.
Open the event, click in the command area, then click on the control variable command, then click on the option "game data" in the next window, then click on the selector ... to the right of that data and choose character, then change to the coordinates as the data source.
Then after you got that data into two variables, use conditional branches to check those variables current values.
On the event to be moved, activated via player touch:
Set Move Route (this event): (Skip if Can't Move) Move Away From PlayerControl Variables [0001: X]: Game Data > Character > This Event's Map XConditional Branch: Variable [0001: X] == final x position Control Variables [0002: Y]: Game Data > Character > This Event's Map Y Conditional Branch: Variable [0002: Y] == final Y position Control Switches [0001: Moved to Correct Place] = ON Branch EndBranch EndAdd a second page to the same event with the same graphic, conditioned by switch 0001, and with no commands. This will stop the player being able to move the object again once it's already in the correct place.Now add the same switch as a condition on the other event. So once the object is moved into place, the other event will become active and the player can interact with it.
Note, I used variables 1 and 2 and switch 1 in the example above. Don't copy that. Use whatever variables you have already allocated for this (or allocate new ones, and use the correct ones in the commands above).
Set Move Route (this event): (Skip if Can't Move) Move Away From PlayerControl Variables [0001: X]: Game Data > Character > This Event's Map XConditional Branch: Variable [0001: X] == final x position Control Variables [0002: Y]: Game Data > Character > This Event's Map Y Conditional Branch: Variable [0002: Y] == final Y position Control Switches [0001: Moved to Correct Place] = ON Branch EndBranch EndAdd a second page to the same event with the same graphic, conditioned by switch 0001, and with no commands. This will stop the player being able to move the object again once it's already in the correct place.Now add the same switch as a condition on the other event. So once the object is moved into place, the other event will become active and the player can interact with it.
Note, I used variables 1 and 2 and switch 1 in the example above. Don't copy that. Use whatever variables you have already allocated for this (or allocate new ones, and use the correct ones in the commands above).
Original thread: https://forums.rpgmakerweb.com/threads/location-events.17567/