Events Restarting After Back to Map.

Hi, everyone...

I have a question still without an effective response . I need to create a guard at the door of a house . He will be a few frames preventing the passage and disappears after a few frames , releasing the passage . He will return after a few frames preventing the passage again and so infinitely . The problem is that when changing the map and go back to the map this event the guard back to be there , the event started again . I need the guard to stay in the same loop when I change the map and back . I could not make it work. Can anyone teach me step by step ?
Events are only present on the current map and aren't saved in anyway once you leave that map so they go back to initial status once you leave that map and return. If you only need them to remember it's last position, Shaz has a script for that.

But of course, it will still restart the loop which might cause more problems. You could possibly opt to use a variable to determine how many more steps it needs to go or something so that using the remember position script won't cause problems for this event.
You can use variables and/or switches to store where he is on the cycle. Multiple events can be used if the guard potentially can start at multiple places, or  you can have a parallel process event placing the guard before an Erase Event is used.

*hugs*

 - Zeriab
Hi,

I'm not exactly sure what you mean, but this is my take on it.

There is a guard that prevents the "exit" to the next area, then moves aside, letting you go "through" and then moves back to prevent the "exit" again. Am I right?
Then when you leave the map and come back, the annoying guard is there again, blocking the way "back down" ?

In this case, add to the event of the guard:

Conditional branch > player map X = "Xposition of the exit" 

                                  player map Y = "Yposition of the exit"

turn self switch A on. 

Now the guard disappears once you touch the exit. Bye bye guard. just make sure at the "self switch A = on" page, you select "below character" or he

will still be blocking the way.

I hope this is what you mean.

/wallie

Original thread: https://forums.rpgmakerweb.com/threads/events-restarting-after-back-to-map.36601/