Game Development Reference
In-Depth Information
Variables do not have to be declared and can store strings and both
integers, longs and floating-point numbers. They act as global variables
so all other scripts in your project can access them.
Arrays must be declared, usually in the StartMovie script, and can only
be used for storing numerical data.
Setting variables
The syntax for setting a variable's value is:
Set variablename = value
The variablename can be a combination of numbers and characters, but
must not start with a number and you can't use any TScript command
names (key, set, call, etc.).
The variable value can be an integer, floating-point number, string, or
numerical or string expression.
Reading variable values
To read a variable's value you simply reference it by the variablename.
Example
The integer variable score is incremented by 10 then concatenated to
some text and written to the text object ScoreText.
On NewFrame
Set score = score + 10
Set ScoreText = “Your current score is” + score
End NewFrame
Arrays
Toon3D supports the single dimension arrays for storing indexed values.
Arrays can only be used for storing numeric data and must be declared
before they can be set or read.
Declaring arrays
The syntax for declaring an array is:
Array arrayname ( indextotal )
Search Nedrilad ::




Custom Search