AI players and prone anim
by Richard Marrevee · in Torque 3D Professional · 09/26/2010 (10:40 am) · 8 replies
There is a strange thing happening when I spawn an AI player into the game. If the model that is spawned has a prone-animation, called prone_root (this is hard-coded in the engine), then the model is assuming this prone position. When this animation is not present, it will assume the root position (which is called root).
First thought was about the model and the animations, but it also happens with gideon, when you rename on of the anims to prone_root.
I am using beta 3 (although I have seen it in B2 also) with the Universal AI Starter kit.
I had looked into the AIplayer.cpp code, added a mPose=StandPose, nothing changed, adde a setPose(StandPose) but again nothing changed.
Is somebody seeing the same thing, or can somebody point me in the direction to solve this.
Thanks
First thought was about the model and the animations, but it also happens with gideon, when you rename on of the anims to prone_root.
I am using beta 3 (although I have seen it in B2 also) with the Universal AI Starter kit.
I had looked into the AIplayer.cpp code, added a mPose=StandPose, nothing changed, adde a setPose(StandPose) but again nothing changed.
Is somebody seeing the same thing, or can somebody point me in the direction to solve this.
Thanks
About the author
Started programming in 1984 on an Oric, when time progressed switched to MSX, Amiga and finally the Windows PC with T3D. Now developing an epic fantasy game: The Master's Eye. Creator of the DoorClass pack and VolumetricFog pack @ richardsgamestudio.com
#2
I thought this had been fixed previously ... with the standPose being defaulted to specifically in player.cpp ...
yawn ... I'll have a check of stock stuff after a cuppa ... but I'm not getting problems in my custom code (which hasn't had that much added to it).
09/26/2010 (2:13 pm)
???I thought this had been fixed previously ... with the standPose being defaulted to specifically in player.cpp ...
yawn ... I'll have a check of stock stuff after a cuppa ... but I'm not getting problems in my custom code (which hasn't had that much added to it).
#3
09/26/2010 (2:37 pm)
Okay ... I've fitted stock Gideon with a copy of crouch_root/forwards/backwards renamed to prone_root/forwards/backwards ... and nothing untowards is happening in the stock Project. AiPlayer is walking normally.
#4
Thanks guys, btw does anybody knows where these ImageTriggerStates are set when adding an AI? I couldn't figure it out yet.
09/26/2010 (2:44 pm)
Mmm strange. Somehow trigger[4] is set to 10 through getImageTriggerState in aiplayer.cpp. Excluding trigger 4 from setting and all is well. Maybe it is something that was introduced by adding the UAISK. Have to dig further in it.Thanks guys, btw does anybody knows where these ImageTriggerStates are set when adding an AI? I couldn't figure it out yet.
#5
The trigger states are set with setImageTriggerState( slot, move->trigger[N] ) on the c++ side.
If you cannot find this set,then trace moveManager and moveList,because they deal with trigger's pack-unpack-reset-update routines.
09/26/2010 (4:33 pm)
Triggers are boolean, bool(10) = true and this is why the casting sets trigger[4].The trigger states are set with setImageTriggerState( slot, move->trigger[N] ) on the c++ side.
If you cannot find this set,then trace moveManager and moveList,because they deal with trigger's pack-unpack-reset-update routines.
#6
What I don't understand is why the ImageTriggerStates are used. In script I can't change this, because I don't have an image mounted. At least this is how I understand it.
09/27/2010 (6:49 am)
Ivan: Thank you, I will dig into this.What I don't understand is why the ImageTriggerStates are used. In script I can't change this, because I don't have an image mounted. At least this is how I understand it.
#7
The ImageTriggerStates are used to "tell" the AIs to shoot,jump,crouch,..
09/27/2010 (8:15 am)
Well,the AIs are not control objects,so they don't receive an input.The ImageTriggerStates are used to "tell" the AIs to shoot,jump,crouch,..
#8
09/28/2010 (7:27 am)
Thought it might be something like that. Thanks Ivan.
Torque Owner Ivan Mandzhukov
Liman3D
I believe you should check why mPose is set as PronePose in player.cpp, At the bottom of updateMove() ,check move->trigger[4]
Also locate and check trigger state 4 at aiPlayer.cpp:
for( int i = 0; i < MaxTriggerKeys; i++ ) movePtr->trigger[i] = getImageTriggerState(i);