Game Development Community

[Question:]What is the best way to find objects' property and method?

by weihua · in Torque 3D Professional · 04/30/2010 (1:14 am) · 5 replies

For example, I want to move a rigidshape to a specific position.
I tried %obj.setPosition , %obj.position="x y z". None of them seems to work.
I can not find any documents providing such information.
Can someone point a way for me?
Thanks a lot !

#1
04/30/2010 (2:33 am)
The documentation is still under construction (see this thread). As for moving RigidDhapes, try using %obj.setTransform("xpos ypos zpos xrot yrot unk zrot"); rot = rotation, pos = position, unk is currently unknown for me, someone else can answer that one.

For finding ConsoleMethods, try using %obj.dump();.
#2
04/30/2010 (8:23 am)
Thank you. That really helps :D
#3
07/15/2010 (7:50 pm)
Note that .dump() will only find methods that have been added via the engine (using addField), but will find properties that you add using script.

I believe this is true, but correct me if I'm wrong. I'd love to know if there was a way to add methods to .dump() using script alone.
#4
07/15/2010 (8:24 pm)
?

If you make a script function under the class it will be dumped.

eg
AiPlayer::randomGoal(%this, %goal)
{
   //science goes here
}

Will dump but won't have any accompanying info on it's usage - that has to be added with code.

randomGoal() - //script
setActionThread() - (string sequenceName, bool hold, bool fsp)//code

#5
07/15/2010 (9:44 pm)
Ah, right. Of course. I thought my response was a bit off! Thanks for the correction, Steve!