NPC Event resets

So I have a guard stopping a player from going into a cave until they provide an' item. My first try at the event was fine and dandy but when I cam back out he was in front of the cave again. So I thought O.K. let's try this and I made extra self switched leading to a set event location call. everything seemed ok but as I exit he was back again at the start. I have tried what I think is a few different ways to call this event but I just cant seem to figure it out. This is only one of the many combinations that I have tried such as doubling up code to try and make him stay put. I know it was redundant and extra code but I was getting frustrated.
Especially with an event like this, you MUST show us the WHOLE event window, as the information outside of the command list is just as important as the information inside it.

After the guard moves, instead of turning on the self switch, turn on a regular switch. Create another event that's conditioned by that switch and is set to Parallel Process. In that event, put a Set Event Location to move the guard where you want him, facing the correct direction. Then add an Erase Event command.

Every time you enter that map after the guard moves, the parallel process event will put him where you want him to be and will then erase itself.

Or, if you have a lot of these and don't want lots of "extra" events, use a plugin. Yanfly has one, but I don't know what it's called. I also wrote one: https://forums.rpgmakerweb.com/index.php?threads/save-event-position.50261/
Especially with an event like this, you MUST show us the WHOLE event window, as the information outside of the command list is just as important as the information inside it.

After the guard moves, instead of turning on the self switch, turn on a regular switch. Create another event that's conditioned by that switch and is set to Parallel Process. In that event, put a Set Event Location to move the guard where you want him, facing the correct direction. Then add an Erase Event command.

Every time you enter that map after the guard moves, the parallel process event will put him where you want him to be and will then erase itself.

Or, if you have a lot of these and don't want lots of "extra" events, use a plugin. Yanfly has one, but I don't know what it's called. I also wrote one: https://forums.rpgmakerweb.com/index.php?threads/save-event-position.50261/

I really don't understand the scripting stuff but the parallel event/erase event worked. I am trying to figure out what that works so I can keep note of it in the future. I have been trying my best to learn things on my own and feel bad when I need to ask. Why after all this time I have only asked two questions in total.

I just assumed if I moved my event to a spot it would leave it there, then I tried the whole set location, self switching and all that. I thought I could figure it out, I mean I'm not the sharpest fella but I even manged to make a lever trap you have to pull in order but I couldn't get this. Made me feel , ehhh not very smart.

-edit- I managed to find that plugin by the Yanfly fella. It made it so much easier not needing extra calls. You plug-in guys are like wizards I tell ya,
When you leave the map and reload it, everything is reloaded as you saved it in the editor, not as it was when you left the map. So if you need events to be in different locations, you need to move them yourself. Event page conditions only determine which page is active, not where the event is going to be.

Don't be afraid of asking questions. There's merit in learning things for yourself, but not in spending 5 hours trying to figure something out when it would take half an hour to ask a question and have someone give you the answer and hopefully explain things as well so you learn 'why'.
Indeed. I guess coming from the olden bbs days where asking questions would get you made fun of or even blacklisted I hesitate to ask even in modern days,

Original thread: https://forums.rpgmakerweb.com/threads/npc-event-resets.89586/