Editing Globals

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
A global variable is available for any script or condition to reference without being linked to a particular quest or object.
Link to TES4 Construction Set Wiki: [http://cs.elderscrolls.com/constwiki/index.php/Globals Globals]


Global variables are declared in the main menu under '''Gameplay -> Globals'''
In addition, a new checkbox is added for the GECK: "Constant".  Checking this box will make changes to this value not persist through game saves.  If the global is to be used as a hidden mod setting value, this checkbox must be un-checked.


*[[List of Global Variables]]


*'''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.
*'''Value:''' The default value for the global variable. This affects the variable only when the plugin was just installed. After that the value is stored in the savegame.
*'''Constant:''' When this box is checked, the variable will be reset to its default value when a savegame is loaded.
==Notes:==
Internally all types of global variables are stored as floating point. 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) and the results of divisions will almost always have decimal places, thus checks like "if global == x" will usually fail after a division.
In most cases, variables defined in quest script are the better choice.
==See also==
[[List of Global Variables]]
[[Category:Gameplay Menu]]
[[Category:Gameplay Menu]]
[[Category:Scripting]]
[[Category:Variables]]

Please note that all contributions to the Fallout3 GECK Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see GECK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)