Syntax and gui scripting can you do it
by Wesley Hopson · in Technical Issues · 01/31/2007 (1:21 pm) · 1 replies
Ok I have a question I have been wondering. You can use [] freely in variables because the variable is evaluated as a string and the brackets get removed. Like the example code
%strpart = "left";
%strleftdirection = "blah whatever you want here";
echo(%str[%strpart]direction);
the echo would print the contents of the variable %strleftdirection I am wondering if you can piece names toghter like this for other things like names of guictrls or is it just limited to variables.
%strpart = "left";
%strleftdirection = "blah whatever you want here";
echo(%str[%strpart]direction);
the echo would print the contents of the variable %strleftdirection I am wondering if you can piece names toghter like this for other things like names of guictrls or is it just limited to variables.
About the author
Torque 3D Owner Sean H.