whitechaos35 Posted June 8, 2012 Share Posted June 8, 2012 I need to perform some calculations and set things up whenever the game is loaded. The page on Complete Example Scripts has the following: Event OnPlayerLoadGame() ; removed EndEvent I cannot find this documented anywhere. Can someone shed some light on an effective method to determine when the game is loaded, or provide the documentation for this event? Thanks! Link to comment Share on other sites More sharing options...
fg109 Posted June 8, 2012 Share Posted June 8, 2012 This event is from the 1.6 beta. Since it's still in beta, nobody has decided to document it on the wiki yet. It is an event from the actor script. Since the ReferenceAlias and ActiveMagicEffect scripts can use Actor script events, you can use it there as well. This event will only fire on a script that is attached to the player. The first time that you load the game with this script on the player, the event will not fire. This is because the OnInit() or OnEffectStart() events in the script will block the OnPlayerLoadGame() event from being received. Since the OnInit() and OnEffectStart() events will only fire when the script is first attached to the player, subsequent game loads where the script has already been attached will receive this event correctly. Link to comment Share on other sites More sharing options...
whitechaos35 Posted June 8, 2012 Author Share Posted June 8, 2012 Thank you for this incredibly useful information. Since it's still in beta, did you discover this on your own or from somewhere else? Link to comment Share on other sites More sharing options...
steve40 Posted June 8, 2012 Share Posted June 8, 2012 (edited) Event OnInit() OnPlayerLoadGame() EndEvent Event OnEffectStart() OnPlayerLoadGame() EndEvent Worth a try... 8) Edited June 8, 2012 by steve40 Link to comment Share on other sites More sharing options...
fg109 Posted June 8, 2012 Share Posted June 8, 2012 @whitechaos35 In the SKSE thread, behippo mentioned the new functions when he had to update SKSE for the 1.6 beta. The rest of the info I discovered through testing. @steve40 Events don't work that way. It would be cool if they did, then I could simulate fake hits all over the place. Link to comment Share on other sites More sharing options...
steve40 Posted June 8, 2012 Share Posted June 8, 2012 @steve40 Events don't work that way. It would be cool if they did, then I could simulate fake hits all over the place. Hmm...you could be right. Though iirc I'm pretty sure I've been able to call events from within events in the same way as one would call a function. It might be worth double-checking this. Link to comment Share on other sites More sharing options...
Recommended Posts