I thought a self-switch would be as temporary, but apparently it lasts through exits and re-enterings...
How would a switch only last as long as the player exits the room?
RPG Maker MZ SupportAll switches and variables are persistent. The only thing that resets when you go back to a map is autorun/parallel events.
So you can either put an autorun event on the map that turns the switch off and erases itself (so it will run one time every time you enter the map), or add a line to the event(s) that transfer the player out of that map to turn the switch back off when you leave.
So you can either put an autorun event on the map that turns the switch off and erases itself (so it will run one time every time you enter the map), or add a line to the event(s) that transfer the player out of that map to turn the switch back off when you leave.
That seems to work, except it also erases the image apparently, although it's not too crucial in my context...
There's no reason that a random autorun event that only exists to toggle a switch should have an image. Just drop it in any random location.
Maybe explain the context, so we can help you come up with the best solution?
It's fine for me now really, I guess if I need the image to remain in the future and can't get it to work I'd ask again. What I need to find now is a free version of some quest journal system plugin...
Original thread: https://forums.rpgmakerweb.com/threads/how-would-a-switch-only-last-as-long-as-the-player-exits-the-room.139540/