Author Topic: Getting the NTObjectName of a brix?  (Read 1582 times)

How can I find out what variables a brick has and add them all to a list?
Is that possible?

How do I get the NTObjectName of a brix?
« Last Edit: August 15, 2012, 01:11:20 PM by Mold »

brickObject.save("path/to/file");

Parse the file. You can't search through non-tagged variables, so this is really the only way.


brickObject.save("path/to/file");

Parse the file. You can't search through non-tagged variables, so this is really the only way.
What are tagged variables ._.

If I remember correctly, a set of variables specified when defining the object class (in the engine).

If I remember correctly, a set of variables specified when defining the object class (in the engine).
Those are member fields


%object.dump(); puts it in the console instead of a file, as well as listing its class functions.

%object.dump(); puts it in the console instead of a file, as well as listing its class functions.

You can't access console output from TorqueScript unless you do some weird stuff with external programs, piping and networking.

Oh, didn't see that second part. My mistake.

How do I get the NTObjectName of a brix?


what does NT stand for?

I remember there being a better way, but this should work:

%a = object.getName();
%a = getSubStr(%a, 1, strLen(%a));


If you want to set it, use object.setNTName("foo");

what does NT stand for?

Named Target.

I remember there being a better way, but this should work:

%a = object.getName();
%a = getSubStr(%a, 1, strLen(%a));


If you want to set it, use object.setNTName("foo");

Named Target.
Isn't it setntobjectname?