Jump to content

Something more useful than GetGameLoaded?


Asterra

Recommended Posts

You could try using GetGameRestarted.

 

Write the script inside a gamemode block and attach it to a quest with the delay of your choice. Then you can use the getgamerestarted in an if statement and make your script run only once each time the player properly restarts the game and loads a save. For example...

scn startscript

begin gamemode

   if getgamerestarted == 1

      insert your script here

   endif

end
Link to comment
Share on other sites

 

You could try using GetGameRestarted.

 

Write the script inside a gamemode block and attach it to a quest with the delay of your choice. Then you can use the getgamerestarted in an if statement and make your script run only once each time the player properly restarts the game and loads a save. For example...

 

This is actually the thing I perhaps struggled with the most. The problem with this approach, by itself, has to do with the quest delay, or perhaps more particularly the inability to directly detect when a game has finished loading (via an event). If you give the GetGameRestarted quest the default delay of 5 seconds, then you will have a random delay of anywhere from 0 to 5 seconds before the code in your script will run. Set the delay lower and you are sapping script horsepower exponentially, even if it is just checking for GetGameRestarted every cycle. I needed that delay to be as low as possible in order to get the script executed as close to "immediately" as possible, yet that ultimately leaves a script with a 0.1-second-or-less delay running nonstop. It boggled my mind that in all these years, nobody had come up with a direct method for detecting a game finishing loading (Skyrim has this well covered, for example). Anyway, I got things sorted out to my satisfaction.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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