Jump to content

OnPlayerGameLoad?


whitechaos35

Recommended Posts

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

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

Event OnInit()
      OnPlayerLoadGame()
EndEvent

 

Event OnEffectStart()
   OnPlayerLoadGame()
EndEvent

 

Worth a try...

8)

Edited by steve40
Link to comment
Share on other sites

@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

 

@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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...