Jump to content

OnInit


Wolfpack49

Recommended Posts

So in looking at the OnInit function, it seems to be designed to only run once on script initialization and then nevermore. If you wanted to run a short script at the beginning of every load of the game, should OnInit be used at all? Just doing some testing with a debug message on game load and wondering what the right event would be.

Link to comment
Share on other sites

If you want to run something at the start of every game, you will need a quest with a player alias record. On the player alias you would attach a script that uses the OnPlayerLoadGame event. You can use this event to trigger things on other scripts either by remotely accessing or by sending a mod event. The latter requires SKSE.

 

More information:

OnPlayerLoadGame

SendModEvent

Accessing Functions from other scripts

Link to comment
Share on other sites

  • Recently Browsing   0 members

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