Game Development Community


#1
09/01/2012 (8:40 am)
TorqueScript itself does not support true arrays - instead it relies on postfixed variable names, for example:

$variable[0] = 1;
$variable[1] = 2;
$variable[2] = 3;

Is the same as

$variable0 = 1;
$variable1 = 2;
$variable2 = 3;

There is however an implementation of a true array object (called ArrayObject) included with later versions of Torque, which is far more practical if you have variable length arrays with many values.
#2
09/01/2012 (3:03 pm)
Thank you, James.