<RefObj> = The ship or station to have the information stored against.
<Var/String> = The string to set as the name for the information, this can be read in from a text file or entered directly as a string.
<Value> = The information being stored.
This instruction takes any script variable that is running, and stores its value on the object (ship or station) on which the script is running.
The term “local variable” is probably unfortunate – the concept is more akin to storing a file on a hard drive.
Think of <Var/String> as the file name, and <Value> as the data in the file.
Any variable type can be stored in this way, including an entire array.
The difference between a global variable and a local variable, as the set local and set global
instructions use the terms, is whether or not the value is stored locally on a particular ship or
base, or stored globally.
To continue the file analogy, the set local variable instruction is like storing a file in a directory, where each and every ship and station has its own directory.
The set global variable instruction is like storing the file in the root directory – any script running on any ship or base can access or change the value when it is stored as a global variable.
$station set local variable: name = 'my_local_variable_name' value = $info.to.be.stored
Global Variables by Cycrow and includes info on Local Variables.
- »» General Commands
<RefObj> set local variable: name = <Var/String> value = <Value>