Jump to content

BSL:Variables: Difference between revisions

m
removing soon-to-be-redlink
(ai2_boss_battle information)
m (removing soon-to-be-redlink)
Line 14: Line 14:
Also, a given variable can store only a specific ''type'' of data (floating-point number or integer or text string or boolean), and that is what we call the variable's type.
Also, a given variable can store only a specific ''type'' of data (floating-point number or integer or text string or boolean), and that is what we call the variable's type.


Finally, the ''name'' of a variable is a unique text string that is used to identify the data container within the script. Like [[BSL:Functions|function]] names, variable names are case-sensitive (NOTE: [[BSL:Preset|preset]] variables and functions are all lower-case). Valid characters are: ''please fill me in''
Finally, the ''name'' of a variable is a unique text string that is used to identify the data container within the script. Like [[BSL:Functions|function]] names, variable names are case-sensitive (NOTE: all variables and functions are lower-case). Valid characters are: ''please fill me in''


An easy way to get the ''type'' and ''value'' of an existing BSL variable is to enter its ''name'' at the console in [[Developer Mode]]: you typically get console output like "bool: 1" or "int32: 42" or "float: 3.14" or "string: hello"
An easy way to get the ''type'' and ''value'' of an existing BSL variable is to enter its ''name'' at the console in [[Developer Mode]]: you typically get console output like "bool: 1" or "int32: 42" or "float: 3.14" or "string: hello"
Line 53: Line 53:
;Please fill in with [http://ssg.oni2.net/commands.htm ssg's stuff] (descriptions + OK if variable works).
;Please fill in with [http://ssg.oni2.net/commands.htm ssg's stuff] (descriptions + OK if variable works).
;Type and default value (from console) if you're motivated enough.
;Type and default value (from console) if you're motivated enough.
;It may be a little less tedious to expand specific subpages of [[BSL:Preset|Preset]]
;(mini-tutorials of sorts) [[User:Geyser|geyser]]