Game Development Community

Animations

by Marcel Boule · in Torque Game Engine · 03/26/2006 (8:03 pm) · 1 replies

Hello.

I am trying to call animations from Torque script using setActionThread() (though any method will do as long as the animations get played).

I have listed the animations in the data block with the others (sequence3, sequence4, etc.) and following the format of the other animations already in the list I named the correct DSQ files followed by the name of the animation.

My animation names match those inside the DSQ files.


I have, for example, set an animation to play when I click the mouse while my character stands still.
At first nothing worked, ever.
Finally I got an animation to work, but only that animation, and I am not even exactly sure what I changed to make it work.
I delete all DSO files and the config.cs file before each test.


I would like to know what are all of the restrictions on using/playing animations.
What parts are being handled by the engine and what is used in general form by script.
Are there any "key prefixes" the engine uses to automatically treat certain animations one way or another or to impose restrictions on the animation (for example, the "cel" prefix).




Also, I have my character stand still and finally got an animation to invoke, but it repeats (and slowly at that, with a long pause between repititions).
How can I just play the animation with no repeats?

Thank you.

#1
04/12/2006 (10:25 am)
Ok. not sure about some of your questions....but here are a few silly mistakes that I have made when exporting animations-

I apologize if these are painfully obvious:

1. Make sure that "cyclic sequence" is not check-marked in the sequence helper in your 3d application. (i use 3dstudio max, I can't really help with any other application).

2. if you are using that "deleteDSO.bat" file to delete the dsos from your folders, make sure it is actually deleting them. In my experience, it doesn't always work. I don't know why.

3. make sure that your sequence helper only has 2 keyframes in the "sequence begin/end" track. Occasionally, when re-edting animations, I have ended up with too many keys in that track because the timeline only showed a certain region of the whole track - old keyframes would'nt be visible until I zoomed way out past the current time region.

4. make sure that you AREN'T listing animations that you don't have in the character's .cs file. From my experience, Torque is incredibly touchy about the whole animation thing - ANYTHING that is wrong in the "YourCharacter.cs" file and in the animations it lists can cause all the other animations to not play. If you don't have a back.dsq animation, don't have it in the .cs file.

5. make sure all listings of the characters various paths and folders is correct.

6. this is a really lame one: I once spent days trying to figure out why my animations wouldn't play -- then finally noticed that some of the lines in my .cs animation file looked like this:

sequence30 = "./player_h1root.dsq h1root";
sequence31 = "./player_h1thrust h1thrust";

I was forgetting on occasion to put in the ".dsq" on the end of the file listing. After you have stared at something so long, it's sometimes hard to see what is really there.