GetGameRestarted

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

A command for Oblivion Script Extender

Syntax:

(gameRestarted:bool) GetGameRestarted

Returns 1 if Oblivion was exited and restarted since the last time this call was made from the calling script. Use this condition to reset or undo changes made by OBSE functions which are not stored in the savegame.

Notes[edit | edit source]

  • Returns true if it is the first time the calling script has run since the player exited and restarted Oblivion.
    • Meaning, each script is handled separately - if "Script A" uses this function before "Script B", it will still return true for both. It will not return true more than once for multiple instances of the same script, such as a token script used by many actors. As such if you have 2 objects with the same script, GetGameRestarted will return true for only one of them.
    • Also meaning, each script is handled regardless of saves - if the player loads "Save A" this function will return true, but if the player loads "Save A" a second time, or a "Save B", this function will return false.

See Also[edit | edit source]