Game Development Community

How to get the object type in scripts?

by Markus Nuebel · in Torque Game Engine · 07/15/2004 (2:22 am) · 2 replies

I have a simgroup, that contains different kinds of objects and even other nested simgroups.

Now I want to make the whole content of the top-level simgroup invisibe.

When I am looping through the objects of the group I want to know, what type of object the current object is, Or at least, I want to know, if it is a nested simgroup or a normal object.

Is there any way to do this?

-- Markus

#1
07/15/2004 (2:50 am)
Do a .dump on the SimGroup name (SimGroupName.dump();) in the console, should reveal all of the base and inherited variables, consolefunctions and methods. If Ir ecall, getType was one of the inherited ones.

-Ron

Also might want to have this at your disposal, might eb a bit dated, but the base functiosn are there.
#2
07/15/2004 (12:52 pm)
Yes, getType() does the thing. And for a SimGroups getType() returns 0.

Thanks Ron.
-- Markus