Game Development Community

GetState not .setState

by Christian · in Torque Game Engine · 03/04/2007 (8:27 pm) · 1 replies

When an AI dies, their .getState() is set to dead. There is not .setState in their .dump(). How do you change it to "Move".

#1
03/05/2007 (3:14 pm)
If the %obj = AIObject, then you are able to do %obj.setDamageLevel(0); and %obj.setDamageState("Enabled"); that will force the engine to switch the state of the object from disabled/dead to active one, IIRC.
While to object is in "moving" phrase, it's state changed by c++ code to "Move".
Have a look at the /engine/game/player.cc and shapeBase.cc code, there is a lot of interesting stuff

good luck

P.S. you can do %obj.dump() to see all possible functions to call on selected object.

edit: some formatting