Game Development Community

How to reference a TSStatic object?

by Scott Peal · in Torque Developer Network · 09/01/2009 (9:25 pm) · 2 replies

I have an objectID for an object in the scene. Would anyone please be so kind as to show me how to reference that object based upon the ID? I am looking to delete it. In C# it would be a type cast command, but not sure if what that is in TorqueScript.

Much appreciated in advanced.


#1
09/01/2009 (10:04 pm)
No casting required. If you have the ID in a variable, you can just do %varname.delete() (or whatever other method you want to call on it).

See here for more info.
#2
09/03/2009 (1:51 pm)
@Greg: Wow! that easy, sweet! Thanks