Game Development Community

Model animations

by Steve D · in Torque Game Engine · 05/02/2008 (6:27 pm) · 3 replies

Hi all, sorry for what is probably a lame question but I hired an artist to make a handful of animal models complete with animations and textures. The problem is the walk animation doesn't play when I move it from point A to B via the setmovedestination command. He also supplied a few player models and they work but I am basically using the stock animations for that (kork animations). I can play the walk animation if I play the thread manually, it works fine.

Anyone have any idea why the walk / run animation wouldn't work? So far this is a problem on all the models he has supplied. Here are the datablocks -

datablock TSShapeConstructor(dogDts)
{
baseShape = "~/data/shapes/animals/dog/dog.dts";
sequence1 = "~/data/shapes/animals/dog/dog_attack.dsq attack";
sequence2 = "~/data/shapes/animals/dog/dog_death.dsq death";
sequence3 = "~/data/shapes/animals/dog/dog_pain.dsq pain";
sequence5 = "~/data/shapes/animals/dog/dog_walk.dsq walk";
};

datablock PlayerData(animal_Dog)
{
renderFirstPerson = false;
shapeFile = "~/data/shapes/animals/dog/dog.dts";
};

#1
05/02/2008 (6:37 pm)
Not sure what you've done to stock code...but have you tried naming your "dog_walk.dsq" with sequence name of 'run', instead of 'walk'? I 'think' that stock code is looking for a specific naming convention and index order of sequences.... That, to me, is stock movement animation calling for a 'player' object....??

IE, there is not stock 'walk' animation calling[probably why you don't see it 'play' at runtime], which is what you've named the movement action sequence, hope this makes some sense.

If I remember correctly, the first 10~11 sequences in the TSSConstructor for a 'player' object are hardcoded into the class...root is 1st, run is 2nd, etc...look to the player Constructor scripting to see how it's indexed. Good luck!
#2
05/02/2008 (6:59 pm)
Good one Sherlock! That appears to have been the problem, the order and making sure it was named run. Thank you!
#3
05/02/2008 (7:06 pm)
Oh now I remember there was one more question I wanted to ask on this same topic - When I lower the bot's move speed, say from 1 to .5 using the SetMoveSpeed command - when he reaches his destination the movement animation still plays for a good 2 or 3 seconds after he stops, is there anything that can be done about that? Does that need to be hard coded into the animation?