it's no work.
by Yue -Rookie Torque 3D- · in Torque 3D Beginner · 09/01/2013 (8:22 am) · 4 replies
$Car = new SimObject()
{
Force = 100;
Color = "Red";
};// console Car.Force // Error.
About the author
http://www.iris3d.tk -Games Studios- <<I do not speak English: I use the google translator>> My goal as a rookie is knowing Torque 3D
#2
09/01/2013 (10:19 am)
Thanks You!new SimObject(Cars)
{
Force = 100;
Color = "Red";
};
// console
Cars.Force //No Error.
#3
Car (as in new SimObject(car)) is the object Name and will exist as long as the object itself exists.
%Car will be a local variable which will cease to exist outside of the function where it is defined.
09/01/2013 (11:23 am)
$Car will be a global variable and will persist throughout the program.Car (as in new SimObject(car)) is the object Name and will exist as long as the object itself exists.
%Car will be a local variable which will cease to exist outside of the function where it is defined.
#4
09/02/2013 (8:07 am)
If I'm understanding the behavior of global and local variables.
Associate Steve Acaster
[YorkshireRifles.com]
echo($Car.Force);//input 100;//output %f = $Car.Force; if(%f > 50) echo("Force > 50 is " @ %f); else echo("Force < 50 is " @ %f);//input Force > 50 is 100;//output