[Solved][RMVXAce] Conditional branch not working as intended

Hi there, I'm having a problem with a conditional branch. It might be trivial, but I can't figure it out.

The problem is that I'm trying to trigger an event when an object is moved to a precise square on the map. It technically works, but the event triggers also when the object is moved to other certain squares.
The desired coordinates are 44x45 but the event does not work if I set those coordinates and works if I set 45x45 as coordinates.
Spoiler: Event page
EventSlide.png
Spoiler: Graphic representation
EventSlide2.png
In particular, by setting the coordinates as 45x45 the event triggers when the objects coordinates are 44x45, 46x45 and 46x46.
More generally, if I set "nxm" as coordinates where n and m are natural numbers, those coordinates do not correspond in game to those I set.
I would like to understand why the coordinates I set do not correspond to the coordinates that work in game.
I hope I was clear. Thank you.
Problem is: you're moving the event AFTER saving the coordinates, so you're actually checking the event's PREVIOUS position instead of the current one. That's why the conditions are met when the event is moved to any adjacent tiles: because the event WAS on the right position. Place the "set move route" command above the variable settings and it should work. Good luck! o/
You could also just draw with a region on the square you want it to move to, then after moving, use the variables to get the event's current X and Y position, then a Get Location Info command to put the region id at those coordinates into another variable. Finally, have your conditional branch check to see if that variable contains the correct region id.
Problem is: you're moving the event AFTER saving the coordinates, so you're actually checking the event's PREVIOUS position instead of the current one. That's why the conditions are met when the event is moved to any adjacent tiles: because the event WAS on the right position. Place the "set move route" command above the variable settings and it should work. Good luck! o/
It worked and it was something trivial, as expected. Thank you!
You could also just draw with a region on the square you want it to move to, then after moving, use the variables to get the event's current X and Y position, then a Get Location Info command to put the region id at those coordinates into another variable. Finally, have your conditional branch check to see if that variable contains the correct region id.
Thank you for the advice! I'm going to try it in another event!

Original thread: https://forums.rpgmakerweb.com/threads/solved-rmvxace-conditional-branch-not-working-as-intended.133897/