Difference between revisions of "Talk:GetGameRestarted"
Jump to navigation
Jump to search
imported>JT (→A friendly warning: new section) |
imported>JT m (copied relevant sentence from article for more meaningful context) |
||
Line 1: | Line 1: | ||
== A friendly warning == | == 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": | Pay close attention to the phrase "exactly once": |
Latest revision as of 18:08, 19 July 2015
A friendly warning[edit source]
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)