Proper Way to Maintain One Time Events

Hi guys,

I'm trying to do execute an event when a player first walks into a room, then never execute the event again. I've seen in tutorials that I can create a boolean, and once the character walks into the room, i can toggle the boolean. Now, I can only execute the event if the boolean is triggered.

The only problem with this approach is that I'm left with a variable that I have to maintain for the entire game, just to determine if an event should be triggered at the beginning of the game... This seems off. Is there a better way to do this?
I suggest you learn the correct terminology.


You create an event that has two pages. The first page is set to either autorun (if you want to do a cutscene) or parallel process (if you want to do stuff that will change the map or events before the player can see them), and at the end, it turns on a self switch (this is your Boolean). The second page has that self switch as a condition, and no other changes to the page.


You do not have to "maintain" the data. If you mean that self switch setting will exist for the entire game, yes, how else do you expect it to keep track of whether the event's been run or not, and whether it needs to run again, for the entire game, if you don't have something that says whether it's been run or not and is able to be looked at every time you go to that map? How do you think ANY game determines whether it should do a certain action at any point throughout the game?
Use self switches instead of switches... That way you won't even notice that self switch anywhere else...

And yeah learn the terminologies and consistency... Like you used boolean in the first part, which I think means switches, then on the 2nd part you used the word variable... Now those are two different things especially if we talk about events (coz of course in reality, the switches are just variables)

Original thread: https://forums.rpgmakerweb.com/threads/proper-way-to-maintain-one-time-events.36393/