Game Development Community

Hidden Gems

by Guy Allard · in Torque 3D Professional · 03/19/2010 (3:10 am) · 6 replies

So, today I stumbled across the script operators foreach and foreach$, which I'm pretty sure did not exist in previous Torques. Really useful for iterating over simsets/groups or delimited strings.

Has anyone stumbled across any other ultra-useful stuff that has been added in T3D that people like me, who rarely read documentation, may have missed?

#1
03/19/2010 (7:07 am)
I think Renee mentioned these new script functions in a thread ... somewhere ... shoulda bookmarked it.
#2
03/19/2010 (9:11 am)
Another, reported also by Rene:

Quote:Yep, there's two operators there for looking up objects by their internal names. [...] This is a great feature that removes a lot of the need for globally naming your objects.
// Look up 'ChildObject' by internalName as direct child of %obj:
%obj->ChildObject;

// Recursively look up 'ChildObject' by internalName as direct or indirect child of %obj:
%obj-->ChildObject;
#3
03/19/2010 (10:04 am)
yeah, I was looking for that thread by Rene, but can't find it :(
#4
03/19/2010 (10:51 am)
It's here:

www.torquepowered.com/community/forums/viewthread/111287

Rene's efforts are heroic--somebody give him a "Damm" medal already... :)
#5
03/19/2010 (2:16 pm)

Quote:a "Damm" medal

Haha :)
#6
03/19/2010 (2:53 pm)
I looked in that thread too ... DOH!