is it possible to have a command like this %this.setTransform(talking$numberOfTalking.getTransform());
by BryceSquared · in Torque 3D Professional · 10/13/2009 (3:13 am) · 5 replies
I want to name objects in the scene and then make the game add them to a marker in game named like this talking1, talking2, etc and i can only think of this code for doing something like that:
I was thinking of using cases but want it to be more dynamic than that.
%this.setTransform(talking$numberOfTalking.getTransform());
I was thinking of using cases but want it to be more dynamic than that.
#3
10/13/2009 (3:31 am)
It's no good, i tried %node = "talking" @ $numberOfTalking;and I get a parse error.
#4
if the error happened on this line, then the syntax error is generally located in the lines above.
Nicolas Buquet
www.buquet-net.com/cv/
10/13/2009 (4:35 am)
This is not normal : this line seems to have a correct syntax.if the error happened on this line, then the syntax error is generally located in the lines above.
Nicolas Buquet
www.buquet-net.com/cv/
#5
10/13/2009 (4:43 am)
Oops my mistake :P forgot the semi colon
Associate Phillip O'Shea
Violent Tulip
In the above example when $numberOfTalking has a value of "2", %talkingObject will be equal to "talking2", then you can just reference the object as normal.
Remember that TS is string based - even objects are referenced from strings!