Game Development Community

Get Object From Console

by Jim · in Torque 3D Beginner · 03/09/2013 (7:52 am) · 2 replies

I'm stumped on something from the console.

Can I refer to various objects from the console?

For example, I'd like to set and view a players health from the console. I figure I need to run something like...
<sudo code>
PlayerObject.setHealth(50);
</end sudo code>


But how can I specify WHICH player object from the console?

#1
03/09/2013 (10:58 am)
I've been given a clue, so I'll try this...

ClientGroup.GetObject(0).player
#2
03/09/2013 (1:48 pm)
That'll work fine for single player ... also localClientConnection.whatever ...

Read through the script manual chm file in the docs (right click and unblock it first!) for more information on server and client.