TorqueScript Reference
|
Typedefs | |
typedef type | Array |
typedef type | Boolean |
typedef type | Float |
typedef type | Integer |
typedef type | String |
typedef type | Vector |
typedef type | Vector2 |
typedef type | Void |
typedef type Array |
Arrays are data structures used to store consecutive values of the same data type.
typedef type Boolean |
Boolean "numbers" have only two values - true or false.
true (1) false (0)
The constant true
evaluates to the number 1 in TorqueScript, and the constant false
evaluates to the number 0. However, non-zero values are also considered true. Think of booleans as "on/off" switches, often used in conditional statements.
typedef type Float |
typedef type Integer |
typedef type String |
Text, such as names or phrases, are supported as strings.
Numbers can also be stored in String format. Standard strings are stored in double-quotes.
Tagged strings are special in that they contain string data, but also have a special numeric tag associated with them. Tagged strings are used for sending string data across a network. The value of a tagged string is only sent once, regardless of how many times you actually do the sending.
On subsequent sends, only the tag value is sent. Tagged values must be de-tagged when printing. You will not need to use a tagged string often unless you are in need of sending strings across a network often, like a chat system.
The second echo will be blank unless the string has been passed to you over a network.
typedef type Vector2 |
typedef type Void |
Void is actually not a real type. It simply represents the absense of a type.