Readgamevar: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
One (talk | contribs)
No edit summary
clarify what happens when the named var is not in the cfg
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''readgamevar''' <varname>
'''readgamevar''' <varname>


Reads a [[gamevar]] that was saved with [[savegamevar]] from the user's configuration file.
Reads a [[gamevar]] that was saved with [[savegamevar]] from the user's configuration file. If the named gamevar is not found in the configuration file (for example, because [[savegamevar]] was never issued for it), <varname> equals 0 after '''readgamevar''' finishes.
 
For per-actor or per-player gamevars, the value at the current actor or player index gets restored, '''not''' the values for all actors or players.


[[Category:EDuke32 specific commands]]
[[Category:EDuke32 specific commands]]
[[Category:Gamevar manipulation]]
[[Category:Gamevar manipulation]]

Latest revision as of 04:20, 20 October 2013

readgamevar <varname>

Reads a gamevar that was saved with savegamevar from the user's configuration file. If the named gamevar is not found in the configuration file (for example, because savegamevar was never issued for it), <varname> equals 0 after readgamevar finishes.

For per-actor or per-player gamevars, the value at the current actor or player index gets restored, not the values for all actors or players.