Talk:GetGameRestarted

From GECK
Jump to: navigation, search

A friendly warning

For each script that calls GetGameRestarted, the command returns true exactly once per game session.

Pay close attention to the phrase "exactly once":

if ( GetGameRestarted || GetGameLoaded )
	Print "Foo!"
endif

...

if ( GetGameRestarted || GetGameLoaded )
	Print "Bar!"
endif

Inside the same script, this will print "Foo!" but will never print "Bar!" -- each use of the function automatically resets its use for that script. If you're not careful with your use of this function, it can result in prolonged frustration. =) --JT (talk) 19:06, 19 July 2015 (EDT)