Game Development Reference
In-Depth Information
Logical operators
and Logical AND
or
Logical OR
Grouping
The use of brackets () to group arithmetic and logical expressions is of
great importance.
Arithmetic expressions are calculated left to right, but it is generally
safer always to use brackets to group operations.
The rule for logical expressions is that expressions either side of the or
and and operators should always be grouped by brackets.
Examples
Set x = 6 + 2 * 3
'will yield x = 24
Set x = (6 + 2) * 3
'will yield x = 24
Set x = 6 + (2 * 3)
'will yield x = 12
If (x = 3 AND y = 2) 'would generate an error
If ((x = 3) AND (y = 2)) 'correct syntax
Properties
Most of the controls in Toon3D have properties that can be read and set
using scripts.
The syntax for reading a property is:
Get property (controlname, propertyname )
The control name is the name of an object, Toon, Text object or Light.
There are also pre-defined control names, which are:
camera - main movie camera
ambient - ambient light colour
scene - see Table A.1 for scene properties

Custom Search