Game Development Community

weapon animation

by Davide Archetti · in Torque Game Engine · 08/21/2002 (12:34 am) · 2 replies

Hi,
I have a question about how to see the animations binded with a weapon. I have a weapon shape (.dts) with animations and in show mode I can see the animations running, but in game, after the weapon is mounted on the player I don't see any animation, if present only the ambient animation runs. I have check the name of the sequence in the shapeImageData definition and they are right..
Any idea?
thanks

#1
08/23/2002 (4:55 pm)
I am not clear on what your saying. I have several animations in my weapons. You have to set the "State" of the weapon in the code to see them play during gameplay.

For example I have a semiauto pistol. When you fire the the hammer pulls and the (lack of a better word) the "slide" goes back then forward to simulate a real weapon.
In my model I have DTS sequence helper called "fire". (I assume you got that covered)
Then in my code under StateName[3] I have a line:
stateSequence[3]                 = "Fire";
That tells the engine what sequence helper to find in the animation. I have similiar sequence animations for all the the different states that my weapon has that can be put in animation form.

Hope that helps.
Matt
#2
08/24/2002 (1:47 am)
Thanks, I have tried again the whole process, from the generation of the DTS file, and I don't know why, but now it works correctly, but I haven't changed anything.
Davide