Is there an out of the box script call or recommended plugin/ method to simply reset the state of all the events on a map every time you transfer the player to that map. I have searched through the script call list but don't know what I'm looking for. Thank you for your time!
RPG Maker MZ Script call/ plugin for resetting all events on a map?
RPG Maker MZ Supportwhat do you want to reset?
the position should automatically be reset, the only thingthat would be kept are the states of switches and variables as those are not part of the events.
there are ways to reset switches etc., but nothing general as no one can know where each switch and variable is used.
so you'll have to give more info before we can point you to the best method for that reset.
the position should automatically be reset, the only thingthat would be kept are the states of switches and variables as those are not part of the events.
there are ways to reset switches etc., but nothing general as no one can know where each switch and variable is used.
so you'll have to give more info before we can point you to the best method for that reset.
I See. I want to reset all of the switches and variables to their default/starting state. I was hoping there is something I can put in the note tags of a map which can refresh its switches and triggers so that when the player enters said map the events which have different outcomes can replay.
No, there is no such a thing for normal switches and variables, because they're global. But if you mean self switches, then I'm sure something like this is possible.
no
you want to reset only the variables and swiches used on a specific map - resetting all switches and variables would be easy, but not limited to the ones on a map but would reset everything on all maps.
but how is the engine to know which switch or variable is used where and how?
you basically need to make a list of which variables and switches are used on the specific map, then you can reset them manually
alternatively you can give every event an additional reset page where you manually reset everything on that specific event - but again that is doing everything manually, just on a different method.
Thank you for you time and consideration.
You can do this via eventing.
forums.rpgmakerweb.com
If there's a reason you want to do it through code instead, that post also links to several others that should pop up on Google with the syntax for it.
Reset events when changing map
Hi everyone! I'm having an issue with my game. There are no random encounters while walking—only visible enemies on the map. When the player defeats an enemy, it turns into a slimy puddle. I achieved this by creating an event that follows the player and triggers a battle with one of my troops...
forums.rpgmakerweb.com
If there's a reason you want to do it through code instead, that post also links to several others that should pop up on Google with the syntax for it.
That said, more information about the mechanics you want to recreate would be needed. By setting up an event with an automatic trigger that declares the starting variables and switches, followed by a 'erase event' command at the end, you'll get a reset of the starting variables every time you re-enter the map. Obviously, these variables and switches should only pertain to the specific map in question; otherwise, as already mentioned, it could cause problems on all maps that use the same variables and switches.
I'll check this out., thank you for your thorough insight as always.
Thank you for your insight. In my development, so far, the variables I would be using for these situations are specific to either the particular event or map, and would not be repeated elsewhere in the game mostly in order to cut down the aforementioned incompatibilities and keep things simple for myself.
Thought this might be worth mentioning.
Ok. Let me explain the two procedures that make changes to an event either permanent or repeatable every time you enter.
Repeatable:
Insert the 'erase event' command at the end of the event.
Permanent:
At the end of the event page, set a self-switch to On, which will lead to a different page, either empty or with code.
Knowing this difference can help you set up your code to define the events on your maps.
Repeatable:
Insert the 'erase event' command at the end of the event.
Permanent:
At the end of the event page, set a self-switch to On, which will lead to a different page, either empty or with code.
Knowing this difference can help you set up your code to define the events on your maps.
Original thread: https://forums.rpgmakerweb.com/threads/rpg-maker-mz-script-call-plugin-for-resetting-all-events-on-a-map.171721/