Firing event after savegame is loaded

Hi,


how can I execute an event after a savegame is loaded?


On new game is easy to write an autorun event on the starting map. But I want to execute an event after a savegame was loaded (so this should be map-independent).


Kind regards,


Purzelkater
you mean common event?
Basically yes.


I can place an event on the starting map as autorun (using self-switch to ensure it only runs once at game start). Now I want to execute this event (or rather the script calls I have used on this events) runs after a savegame was loaded too.
Do you want execute the event with any load files?
I hope this is what you want


http://mvplugins.com/plugin/izyees/Izys%20Common%20Event%20On%20Load


if you want to run an event, just switch on 'x' switch in the common event.


then in that event, make a condition when switch 'x' is on.
@mrcopra: Yes, that's right. I'd like to show a "Welcome back" message (and some other stuff) after every load.


@izyees: Well, this looks like the right way but can't get it to work properly. On my start map I have added a new event but I don't understand your "switch on x" setting to fire this event after the savegame was loaded. Sorry... //rmwforums.s3.amazonaws.com/emoticons/default_sad.gif
try this plugin

View attachment Event After Load.js
OMG! *facepalm* For hours I have tried to get it to work, because I unrealized there are common events. I had tried to get this working with map events that couldn't work. On German tanslation it's called "Gew. Ereignisse" - don't know what "Gew" stands for, but with the english help file I have missed that.
Anyway, it's so easy now. Just made a common event and call reserveCommonEvent after load. Thank you so much you both! 🙂
Hi there, sorry to resurrect a thread. 


@mrcopra, your plugin is great. Is it possible to only have the event run for the first time you load a save ... not every time. So if you quit the game and load a save, the common event would run. But if you are already mid-game and load a save - nothing happens.


Also, to further clarify ... if you loaded a save for the first time, it would run the common event. Then if you loaded a save again nothing would happen.


However, if you quit the game and loaded the save, the event would run again. 


So it resets after every quit.


Thank you.
Hi there, sorry to resurrect a thread. 


@mrcopra, your plugin is great. Is it possible to only have the event run for the first time you load a save ... not every time. So if you quit the game and load a save, the common event would run. But if you are already mid-game and load a save - nothing happens.


Also, to further clarify ... if you loaded a save for the first time, it would run the common event. Then if you loaded a save again nothing would happen.


However, if you quit the game and loaded the save, the event would run again. 


So it resets after every quit.


Thank you.



hmmm, to be sure i understood


you want event run once and when you saved it will not run again


but if you quit the game without save override the old one it will trigger again?
Thank you for responding, 


So basically it the common event would only run once per play session. 


If the player quits the game and loads a saved game, the common event would run.


If the player has already loaded a save, and loads another one it wouldn't run


Basically, the event is only allowed to be run once per play session. If the player quits, it's reset.
Thank you for responding, 


So basically it the common event would only run once per play session. 


If the player quits the game and loads a saved game, the common event would run.


If the player has already loaded a save, and loads another one it wouldn't run


Basically, the event is only allowed to be run once per play session. If the player quits, it's reset.



Try this 

View attachment Event After Load.js
Thank you for this @mrcopra, unfortunately that didn't work for me.


Each time I load a saved game, the common event runs. Not only the first time in the play session.


I have set the switch ID in the plugin to 300 (a switch that isn't being used anywhere), but unfortunately it doesn't work for me ... unless I'm doing it wrong.
it will disabled common event if you saved the game after it triggered
Thank you so so much!
Hello @mrcopra!


I would love for the run common event on successful load to work for me but for some reason it only works sometimes.


Sometimes it seems to only work the first time I load the save but then If I try to load the same save again, it doesn't work.


Other times it doesn't seem to work at all.


I use a lot of Yanfly's scripts and I am hoping the save core isn't interfering with this plugin. I placed the plugin in all different locations but it doesn't seem to help at all. Any suggestions? 
@izyees I tried yours after and it works! Sweet! Thanks!


P.S. Sorry for double post, I would add to above but I can't delete this, sorry.

Original thread: https://forums.rpgmakerweb.com/threads/firing-event-after-savegame-is-loaded.58145/