Guards?

I've been having a heck of a time with guards in this game.

Basically, once the player meets a certain condition, the guard moves out of the way...but I still want to be able to interact with the guard.

For the first one I have, it's when a player defeats a boss (off map, to boot!).

For the second one, it's when the player comes in with a certain party member; there's a short conversation and the guard moves. I'd rather like him to stay moved when I go off the map.

Every time I try an autorun script to change the event location based on these conditions, it doesn't like it.

If I put no other condition, it freezes the game.

If I put "erase event"...I actually should have guessed what that did.

guardproblems.png

guardproblems99.png
After your switch is turned on, your second page is taking priority, and as an autorun it will keep looping, thus it freezes. Your last page should not be an autorun.
After your switch is turned on, your second page is taking priority, and as an autorun it will keep looping, thus it freezes. Your last page should not be an autorun.
So if I reverse the pages, the guard moves first since the new second page would be action button?
The page order is fine, you just can't have an autorun there on the second page. You need another way to use Set Event Location.
The page order is fine, you just can't have an autorun there on the second page. You need another way to use Set Event Location.
I've been using a second event as the "page 2", but it just seems messy to me.
Shaz has a script which remembers event location when you leave a map. On phone so can't give a link but easy to find
You're thinking about this all wrong, don't think about it from the perception of the player, think of how you can make it "look" as if that is happening.

make a 3rd page(keep the page blank), then make a 2 page event where the guard is to move. The first page should be blank, and the 2nd page has the Guard sprite(use whatever switch you turned on to activate the blank 3rd page of the other Guard event, as a condition for the 2nd page of this event). Now when you leave map, and come back, the guard will seem to be still in his new position.

Developing events in a game, is a lot like making a scene in a movie(It's about how you can make a scene look proper on film, while not having to really do everything that's in the film, which many things wouldn't be very legal  or safe to do for real).
Either switch page 2's trigger to parallel process, it will move the guard automatically without having a continuous loop or make it so that page 2 has the move command, the npc is a guard after all, it won't leave its post all the time just when the player is nearby

Original thread: https://forums.rpgmakerweb.com/threads/guards.23475/