Back to index.
Variables are where you store values or game objects. Assignments are followed by expressions.
A variable is the token you use to refer to something in the script, which you can then use in statements to perform tasks etc on the said reference stored in the token..
Operators that assign values to variables.
5.1.1 identifier
The user defined token the script programmer uses as a reference to script references.
At the time of this document a game object can have a property enquired or set, depending on what makes sense. The implemented choices are found in scriptenums.h
NB. If you are setting the SPEED of an object you should do it before you set it moving.
SCRIPT_OBJECT_PROPERTY_TYPE_AGE of LostBrother = 21
5.2.1 = expression
Assigns the expression on the right of the operator to the variable on the left.
5.2.2 += expression
Adds the expression on the right of the operator to the variable on the left and assigns this value to the variable on the left. A += B is the same as writing A = (A + B)
5.2.3 -= expression
Subtracts the expression on the right of the operator from the variable of the left and assigns this value to the variable on the left. A -= B is the same as writing A = (A - B)
5.2.4 *= expression
Multiples the variable on the left of the operator by the expression on the right then assigns the value to the variable on the left. A = B is the same as writing A = (AB)
5.2.5 /= expression
Divides the variable on the left of the operator by the expression on the right then assigns the value to the variable on the left. A /= B is the same as writing A = (A/B)
5.2.6 %= expression
Divides the variable on the left of the operator by the expression on the right and assigns the remainder to the variable on the left. A %= B is the same as writing A = (A%B)
Increases the value to the left of the operator by one. A++ is the same as writing A = (A + 1)
Decreases the value to the left of the operator by one. A-- is the same as writing A = (A - 1)