Game Development Community

Custom .dsq files overriding 'standard' animations

by Luis Anton · in Torque Game Engine · 01/20/2004 (2:29 pm) · 3 replies

I know that 'animations' is everywhere in the forums, but after reading lots of threads, I couldn't find anything similar to my problem... I need information about how to add your own animations to the bots. We already have the .dsq files, and they work. The problem is overriding the c++ code, because we get strange behaviours when using our own animations with %this.playThread(slot, name) or %this.setAnimThread(name...).

The problems is that, instead of the new thread, say 'swimming', where the bot is in a horizontal position moving arms and legs, we get a bot in the 'root' thread when it collides with something: it remains horizontal but moves like in the 'root' animation :m Our bot is not swimming, it's just an example. The point is that it conserves the inclination!

I know there are some states controlled in player.cc, like 'run', but I have tried even commenting certain functions (setActionThread), and I still have the same problem :m

#1
01/20/2004 (3:35 pm)
Check out the way the jet sequences are implemented for the flying vehicle class, sJetSequence etc. That method is effective in adding the needed threads and providing a way to access them. Then it should be relatively simple to write some code to play them, wther its via the source or a scripted trigger.
#2
01/20/2004 (4:43 pm)
Swimming was very easy, and I suspect any other animations you need are as well.
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4348
#3
01/21/2004 (2:40 am)
Em, Eric, notice the 'Our bot is not swimming, it's just an example' ;) Anyway, the thread may be useful, I think I'll have to do something similar. I thought it would be more straightforward, I wasn't expecting Torque to override playing threads!! :(

What I don't understand is where Torque decides to use the 'root' animation when a player object has no velocity... I commented the whole void Player::pickActionAnimation(), so the 'run' animation is not used. Doing just that, human bots don't walk, they just slide through the scene. Then, if you use a %this.playThread(0,'run') before a 'setMoveDestination', for example,it runs again properly. But the 'root' animation is different, or at least is nowhere to be seen in the 'pickActionAnimation()' function :m. What is more: why is the orientation conserved? Our 'root' animation is totally vertical, but when this thing happens, it addapts to the otientation of the upper body part! :?