Readgamevar: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Clarify usage with per-actor or per-player gamevars.
clarify what happens when the named var is not in the cfg
 
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.
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.

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.