Firing event after savegame is loaded

Purzelkater

cat as cat can
Veteran
Joined
Feb 20, 2016
Messages
86
Reaction score
69
First Language
German
Primarily Uses
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
 

izyees

My Secret Santa
Veteran
Joined
Oct 24, 2015
Messages
248
Reaction score
67
First Language
english
you mean common event?
 

Purzelkater

cat as cat can
Veteran
Joined
Feb 20, 2016
Messages
86
Reaction score
69
First Language
German
Primarily Uses
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.
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
Do you want execute the event with any load files?
 

Purzelkater

cat as cat can
Veteran
Joined
Feb 20, 2016
Messages
86
Reaction score
69
First Language
German
Primarily Uses
@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
 

Purzelkater

cat as cat can
Veteran
Joined
Feb 20, 2016
Messages
86
Reaction score
69
First Language
German
Primarily Uses
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! :)
 

Eff-n-Geoff

Veteran
Veteran
Joined
Oct 26, 2015
Messages
182
Reaction score
7
First Language
English
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.
 
Last edited by a moderator:

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
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?
 

Eff-n-Geoff

Veteran
Veteran
Joined
Oct 26, 2015
Messages
182
Reaction score
7
First Language
English
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.
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
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
 

Eff-n-Geoff

Veteran
Veteran
Joined
Oct 26, 2015
Messages
182
Reaction score
7
First Language
English
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.
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
it will disabled common event if you saved the game after it triggered
 

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
455
Reaction score
357
First Language
English
Primarily Uses
N/A
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? 
 
Last edited by a moderator:

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
455
Reaction score
357
First Language
English
Primarily Uses
N/A
@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.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top