GetGameRestarted

From GECK
Jump to: navigation, search


A function added by the Fallout Script Extender.

Description

Returns 1 when the game is restarted on a per-script basis. For each script that calls GetGameRestarted, the command returns true exactly once per game session. Useful for situations in which a script must set certain object properties or settings each time the game is started.

Syntax

[help]
(int) GetGameRestarted 

Notes

  • To clarify, "restarted" means whenever the game is launched. The time after the game is launched and before it is closes is known as a "session". This functions returns true once per session, per-script.
    • Therefore, GetGameRestarted does not re-trigger on reloading a save after death or from the pause menu, nor does it re-trigger each time a new game is started in the same session. See GetGameLoaded if that functionality is needed.
  • "Per-script" means that if this function is used more than once in a script, the second instance of it will return false. Therefore it's crucial that any relevant parts of the script are kept within a single instance of this function.
    • On the flipside, GetGameRestarted can return true for multiple scripts (but only once per each script, per session).

See Also