Game Development Community

Correctly triggering animations

by Quest Johnny · in Torque Game Engine · 03/09/2005 (7:14 am) · 1 replies

Hello all,

Currently I am trying to make a game where movement modes are very important to gameplay, and I'm having a bit of trouble with the ways and times animations are triggered in the torque engine.

The game involves flying, swimming, running and jumping (and hopefully climbing later) - foreward, side, back modes as normal in torque. I've added the jetting and swimming, but I'm having the following trouble:

Jump: When my characters jump, they go into "jump" animation, then near the top of the curve they go briefly into "run" then into "root" animation, then into "fall" - Ideally, I would like them to go from "jump" to "fall" and not go into root, and not return to "run" until they are back on the ground.

Swim: I modified the code (not script) so that they go into swim when moving underwater, but sometimes when they swim back up onto land they stay in 'swim' for what appears to be the end of the a cycle. It looks very odd.

I have most of the sequences set at '0' and I am using sequences coded right into my max file (not using DSQs and no blended animations yet.) I tried setting the run animation to a higher priority, but it changed nothing.

Run is set to cyclic, with sequence priority 1
Swim is not cyclic, not set to 'complete' and has sequence priority 0.

#1
03/09/2005 (1:19 pm)
I suggest adding a variable to control the current move mode, and write a version of pickActionAnimation for each mode.