Hackfield Posted October 20, 2019 Share Posted October 20, 2019 I need to fire a script each time a save is loaded, I tried with OnPlayerLoadGame, but that only works the second time a save is loaded Is there any way to do this? Help would be really appreciated Link to comment Share on other sites More sharing options...
DieFeM Posted October 20, 2019 Share Posted October 20, 2019 OnPlayerLoadGame fires the first time a save is loaded, but it happens the next time a save is loaded after the event is registered, so if you want it to happen the first time that you load the mod then you just need to do whatever you do in this event in the event where you register for it.For example, in a quest that starts enabled, you could use a script like that: Scriptname MyOnPlayerLoadGameQuestScript extends Quest Function WhateverYouDoOnPlayerLoadGame() ;Code here EndFunction Event OnQuestInit() WhateverYouDoOnPlayerLoadGame() RegisterForRemoteEvent(Game.GetPlayer(), "OnPlayerLoadGame") EndEvent Event Actor.OnPlayerLoadGame(Actor akSender) WhateverYouDoOnPlayerLoadGame() EndEvent Link to comment Share on other sites More sharing options...
Recommended Posts