Reset Event Character Location

I've run into an issue with a scene I'm creating.

I have an event character, we'll call him Sam, who is battling other events on screen. Monster 1, 2, 3 and 4.
Sam is surrounded. Monster 1 is two tiles in front. Monster 2, two tiles to the right, Monster 3, two tiles down.
Monster 4 two tiles to the left. Sam is currently jumping around attacking each monster. Sam jumps to the left attacks and then jumps back right to his original central position. He turns down. jumps down, returns to his position. This pattern continues for a while in a parallel process while the player battles other on screen foes. This is done on Sam's event tab 1.
Eventually I transfer the player to right in front of Sam's location. A switch triggering Sam's tab 2 is triggered. A scene is supposed to play out here .
Sam wipes out monster 1, 2 3 and 4 simultaneously and is supposed to move up from his central location and talk to the player.
The scene relies on Sam being in that particular spot to play out properly.
However depending on how much time it takes for the player to trigger the event to be transferred to Sam, Sam's location differs slightly due to his jumping around. Sam might be 1 to the left of where he needs to be, 1 down etc... This throws off the entire following scene.
Due to the placement of events on the map there is no room to create an all new Sam event to trigger at this point.
Sam's 2nd tab location is tied to where he was located in in the first tab. I need Sam to always be in that central starting location when the 2nd tab is triggered.

I hope I explained this in a way that makes sense. Any help would be appreciated. Thanks.
Using Variable OPs you can check his exact position, and then check using Conditional Branches you can cover every possible position and then eventually you can do little jumps to correct his position.

Variable Sam X = Event X Coord
If Sam = 10 (example value)
Jump x+1
If Sam = 12
Jump x-1

A more radical solution is to use the Change Event Location Command, then you can explicitly set his position.

If Sam is able to walk so the animation could place anywhere, in other words you dunno where to jump, you can save his X Y coordinates right in the beginning and then change his position according these variables.
Using Variable OPs you can check his exact position, and then check using Conditional Branches you can cover every possible position and then eventually you can do little jumps to correct his position.

Variable Sam X = Event X Coord
If Sam = 10 (example value)
Jump x+1
If Sam = 12
Jump x-1

A more radical solution is to use the Change Event Location Command, then you can explicitly set his position.

If Sam is able to walk so the animation could place anywhere, in other words you dunno where to jump, you can save his X Y coordinates right in the beginning and then change his position according these variables.
I'll give it a try. Thanks.
hmm maybe try adding this loop at the start of your second page so the player will walk to the right coordinate before continuing the event.

change 9 and 4 to the x and y of your event position

tell me if you want the event to 'warp' instead of walking to destination.

hope this help.

edit: if you want it to 'warp' use @Aerosys sugestion above. store the x and y to variables. then use set event location at the start of second page.
Thanks both of you!
I was able to figure something out.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/reset-event-character-location.132048/