Struct ScriptGlobal¶
Defined in File haloscript.h
Struct Documentation¶
-
struct
ScriptGlobal
¶ Structure containing data for a game engine global.
- Note
When using globals in source code, do NOT modify the value fields directly. Use BlamScript::Globals::UpdateGlobal instead. Since a single struct is used for all globals regardless of type, modifying the fields directly will cause an inconsistent state.
value_raw
is ALWAYS updated, as it is used in several places for displaying the value as text. The UpdateGlobal() functions handle this all on their own.
Public Members
-
std::string
name
= ""¶ The name of the global.
-
std::string
info
= ""¶ An optional description of the global.
-
std::string
value_raw
= ""¶ The raw value of the global as a string.
-
bool
read_only
= false¶ Whether or not the global is protected from modification.
-
bool
boolean_value
= false¶ The boolean value of the global.
-
short
short_value
= 0¶ The short value of the global.
-
long
long_value
= 0¶ The long value of the global.
-
int
int_value
= 0¶ The int value of the global.
-
float
float_value
= 0.0f¶ The float value of the global.