Game Development Community

Death1 will be the death of me

by Andy Hawkins · in Torque Game Engine · 04/22/2006 (11:48 pm) · 3 replies

So I'm attempting to incorporate my death1 animation - but there seems to be something going on behind the scenes that's stopping me from getting it to work.

I've made a death anim, called it's sequence death1.

It's the same setup as the root pose so bones, mesh etc are compatible.

In the player.cs I assign it using the following command...(copy for all type of death)

sequence9 = "./player_die.dsq death1";
sequence10 = "./player_die.dsq death2";
sequence11 = "./player_die.dsq death3";
sequence12 = "./player_die.dsq death4";
sequence13 = "./player_die.dsq death5";
sequence14 = "./player_die.dsq death6";
sequence15 = "./player_die.dsq death7";
sequence16 = "./player_die.dsq death8";
sequence17 = "./player_die.dsq death9";
sequence18 = "./player_die.dsq death10";
sequence19 = "./player_die.dsq death11";

- when the player dies - it crashes the engine.

If I assign the dsq "player_root.dsq" it works fine, in that when it plays it just shows the root idle pose until I click fire.

Now this could be that it doesn't know what anim to play and so plays the root anyway, ignoring my player_root.dsq assign like so...

sequence9 = "./player_root.dsq death1"; .... blah to sequence 19

Even if I go back to the root anim, tweak it to fall over and save a sequence called player_die.dsq (so it's all totally compatible) it crashes.

Seems like there's some hardcoding going on under the hood - or I'm missing something. Can anyone help please?

#1
04/23/2006 (12:06 am)
Make sure your animation has the ground transform exported. In player.cc it uses it to lower the corpse to the level of the ground.
#2
04/23/2006 (1:32 am)
Alrighty then - thanks for the tip. I ran a debug on the source and indeed it does crash when trying to get the ground transform on dying. Now... how to include it? Hmm... can't seem to get ground transform out of LW2DTS on a DSQ.... will keep looking.... thanks Peter :)
#3
04/23/2006 (2:20 am)
Just an update - for anyone wanting to find out more about this just do a search for "death animation crash".

these two threads mention it (should have searched a bit harder me thinks)
www.garagegames.com/mg/forums/result.thread.php?qt=10469
www.garagegames.com/mg/forums/result.thread.php?qt=12421

LW2DTS wont export ground transform for DSQ's (well not that I could see) and I didn't want to put all my anims into the master DTS file. So I renamed all my death(n) animation to dead(n) in "player.cs" to avoid a conflict in the code that looks for the ground transform when dying.

The better solution would be to add a ground tranform into each death DSQ but I couldn't figure out how to do that with LW2DTS because it only seems to add a ground transform to the DTS file, not the DSQ file.