Closed Scrivener07 closed 6 years ago
Instead of loading only inside of OnInit
, I now also do a reload with the OnPlayerLoadGame
event.
Event OnInit()
RegisterForRemoteEvent(Game.GetPlayer(), "OnPlayerLoadGame")
OnGameReload()
WriteLine(self, "Initialization is complete for "+ToString())
EndEvent
Event Actor.OnPlayerLoadGame(Actor akSender)
OnGameReload()
WriteLine(self, "Reload is complete for "+ToString())
EndEvent
Event OnGameReload()
If (Data())
Load()
EndIf
EndEvent
Fixed with commit 256e24f
OnInit only occurs once ever during the entire lifetime of a script. The problem is likely the function
OnInit
on the Games:Shared:UI:Display. Maybe F4SE/Scaleform does not persist injected UI elements across game reloads? I will try to use the OnPlayerLoadGame - Actor event to reload the UI display onto the target menu.Papyrus