NPC keeps warping into its original position at start of event

Another problem. How am I to have an NPC stay in the most recent position upon exiting the map without scripts? I've tried using what has been mentioned for this kind of problem, but the event just warps back to the first location. I don't want this, and I can't figure out all this info I've been reading about how this kind of event is made. In the below pics, I'm using two events as one answer I had read mentioned that was how to do this.


Injured woman event.png


Injured woman event2.png


Injured woman event3.png


After the third pic, I'm trying to keep the NPC in the bed with a switch when I leave the map and come back. But I can't seem to figure this one out. View below the second event on this map.


Injured woman event4.png
The easiest way is to use a script - more precisely Shaz' "remember event position" Script.


That is because that "return to original position" is the intended default behaviour on reloading a map.


If you want to prevent that without a script, there are several ways to to this with eventing, but they all are more complex and require you to be good at logic design.


I would use one variable for each NPC-event, with the numbers of the variable standing for the different possible positions.


Then, at each possible position you make a new event conditioned to that variable.


In the first position, the variable will be zero on the first page, and it will be conditioned to variable value 1 or higher on the second page. The second page also needs to have through active, be above player and have no sprite. On the first page you'll do whatever that event has to do and at the end (when it reaches the second position) it will increase the variable by one (effectively disabling itself)


On the second position the first page will be conditioned to the variable value 1 (so that it activates on the same moment the second event disables itself). And the second page of the second event should be conditioned to value 2 with everything disabled, so you can repeat the process when the second event reaches the third position (if any) and the third event takes over.


As I said above, it's easier to use a script for remembering event positions.
@Andar Hm, yes. Shaz did mention her script in her answer on a similar topic would be easier. They are free downloads right, or able to be downloaded? But I'll see if your answer helps first, to see if it works. Thanks Andar.


I've tried, but the event just repeats itself. Maybe I should just use Shaz's script for this problem. Thanks for the help.
Yes, the script is completely free, both for commercial and non-commercial use.  In case you want it, here's the link.


Oh, and Shaz is a 'her' not a 'his'.
@ksjp17 Alright. I didn't know. Thanks for the link, but I've realised I did not need the event starting under the lumber. It's sorted now, but the other problem I have is my intro. I can't stop the player from appearing wrongly, either before or after the transfer. He either appears on a black screen before the map, or appears after a moment on the map. It is annoying, and I can't fix it.
@mikey193drago Please make a new topic for this new problem, and include screenshots of the event pages, then we can tell you where you made a mistake.


Since this problem is solved


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/npc-keeps-warping-into-its-original-position-at-start-of-event.67925/