Game Development Community

Is the name of an object searcheable?

by Graham Evans · in Torque Game Engine · 01/30/2006 (4:13 pm) · 1 replies

Greetings all :)

Is there an easy way in script to either link objects together or search on the name of an object to trigger an action on it?

I guess what I am trying to do is have a switch which is triggered by /interact/ which is working, but to then locate a named object and make that object, say a doot, open rather than just interacting directly with the door itself.

Thanks in advance.

Graham

#1
01/30/2006 (5:49 pm)
You can just address the object by its name:

new ScriptObject(Foo);
Foo.bar = 5;
echo(Foo.bar);