Game Development Community

Change default player animation?

by Shon Gale · in Torque Game Engine · 09/30/2007 (9:37 am) · 1 replies

I need to change the default player animation when the player spawns. I have been looking all over the forums and can find no mention of this. What I want to do is change the default "run" animation sequence to a "walk" animation sequence. Their is a walk sequence coded into my characters as .dsq's and they all work great when I use the guiObjectView resource and change the animations when viewing the character. They also work fine in ShowTool Pro.
I have the following datablock setup:
datablock TSShapeConstructor(NpcDts)
{
baseShape = "./npc.dts";
sequence0 = "./npc_root.dsq root";
sequence1 = "./npc_walk.dsq walk"; // here is my walk animation
sequence2 = "./npc_run.dsq run"; // and my run animation
sequence3 = "./npc_back.dsq back";
sequence4 = "./npc_side.dsq side";
sequence5 = "./npc_crawl.dsq crawl";
sequence6 = "./npc_duck_start.dsq duck_start";
sequence7 = "./npc_duck_loop.dsq duck_loop";
sequence8 = "./npc_duck_end.dsq duck_end";
sequence9 = "./npc_jump.dsq jump";
sequence10 = "./npc_standjump.dsq standjump";
sequence11 = "./npc_swim.dsq swim";
sequence12 = "./npc_attack.dsq attack";
sequence13 = "./npc_death.dsq death";
};
Any help will be greatly appreciated as I need my characters to walk not run (sounds like school)
It would be great if someone could tell me how to do this in script because you will notice I also have a swim animation and want to be able to change to swim mode and back through script.

#1
11/21/2007 (9:32 am)
All you would have to do is change the line
sequence2 = "./npc_run.dsq run";

to
sequence2 = "./npc_walk.dsq run";

Then when it looks for the sequence named "run" it will play the walk sequence. If you wanted to swap them completely, you'd do similarly for the walk sequence by changing the sequence1 line to use the npc_run.dsq with the name "walk".