[Solved] How to check for an player position as a condition
RPG Maker VXAce Supportit is easy, but you need a sequence of commands - it can't be done with conditional branches alone.
Use control variables (and two variables) to get the player X and player Y into those two variables (those coordinates are part of the "game data" option that only defaults to the map ID as the third part of the coordinates), and then use two (or three for map ID) conditional branches to compare those numbers with the coordinates you want.
Use control variables (and two variables) to get the player X and player Y into those two variables (those coordinates are part of the "game data" option that only defaults to the map ID as the third part of the coordinates), and then use two (or three for map ID) conditional branches to compare those numbers with the coordinates you want.
What exactly is it you want to do, than we can offer more detailed Eventing or Eventing Script snippet Solutions.
"doesn't work" isn't really a bug report - you should be more specific.
That said, there is no direct error in the code, which suggests that you're either checking for the wrong coordinates or that you're not calling the common event correctly.
Please add a show text after the control variable commands but before the position check to display the current coordinates with a text "Position: x-\V[5], Y-\V[6], M-\V[7]".
If you don't get the message, the skill (or whatever) calling this common event is wrong. If you get the wrong numbers, you either misread the coordinate grid or the variables are used by a script in addition to your use.
That said, there is no direct error in the code, which suggests that you're either checking for the wrong coordinates or that you're not calling the common event correctly.
Please add a show text after the control variable commands but before the position check to display the current coordinates with a text "Position: x-\V[5], Y-\V[6], M-\V[7]".
If you don't get the message, the skill (or whatever) calling this common event is wrong. If you get the wrong numbers, you either misread the coordinate grid or the variables are used by a script in addition to your use.
Original thread: https://forums.rpgmakerweb.com/threads/solved-how-to-check-for-an-player-position-as-a-condition.68055/

