Difference between revisions of "Globals"
Jump to navigation
Jump to search
imported>JOG m |
imported>Jduvall |
||
Line 13: | Line 13: | ||
==See also== | ==See also== | ||
[[List of global variables]] | [[List of global variables]] | ||
==Note== | |||
The value of a Global is stored in the save game. So you can not change the default value (by using the Globals form in the editor) of a an already existing Global in a plugin and expect it to change in a player's saved game unless you also script this with a "set myGlobal to whatever" line in a script. | |||
[[Category:Gameplay Menu]] | [[Category:Gameplay Menu]] | ||
[[Category:Scripting]] | [[Category:Scripting]] | ||
[[Category:Variables]] | [[Category:Variables]] |
Revision as of 12:39, 15 June 2006
A global variable is available for any script or condition to reference without being linked to a particular quest or object.
Global variables are declared in the main menu under Gameplay -> Globals
- EditorID: The name of the variable. No spaces or special characters are allowed.
- Variable Type: Short and Long are actually the same thing. Both are integer formats. Float is a real number format. Internally all types of global variables are stored as 32-bit floats. The technical implementation of this variable-format causes inaccuracies at very high or low values. (e.g all numbers from 2000000000 to 2000000064 are stored as 2000000000)
- Value: The default value for the global variable.
See also
Note
The value of a Global is stored in the save game. So you can not change the default value (by using the Globals form in the editor) of a an already existing Global in a plugin and expect it to change in a player's saved game unless you also script this with a "set myGlobal to whatever" line in a script.