Death animation not playing
by BroZebub · in Torque Game Engine · 12/21/2004 (6:27 am) · 5 replies
I've noticed several past postings with no solutions for the topic of bots not playing death anims. I've employed the following two different code scenarios to no effect:
function AIBeast::playDeathAnimation(%this)
{
if (%this.deathIdx++ > 6)
%this.deathIdx = 1;
%this.setActionThread("deathIdx" @ %this.deathIdx);
}
function AIBeast::playDeathAnimation(%this,%deathIdx)
{
%this.setActionThread("die1");
}
Has anyone solved this problem?
function AIBeast::playDeathAnimation(%this)
{
if (%this.deathIdx++ > 6)
%this.deathIdx = 1;
%this.setActionThread("deathIdx" @ %this.deathIdx);
}
function AIBeast::playDeathAnimation(%this,%deathIdx)
{
%this.setActionThread("die1");
}
Has anyone solved this problem?
#2
I,m assuming I'm to add your code snippet to one of my playDeathAnimation functions like so:
function AIBeast::playDeathAnimation(%this)
{
%death = getRandom(1,3);
%this.setActionThread("death"@%death, false, false);
%this.playThread(0,"death"@%death);
}
correct me if I'm wrong, also I use Milkshape to produce my models and I don't see a way to export .dsq files to compile a bots.cs file per your example. Is there a plugin for Milkshape or am I SOL?
12/21/2004 (2:05 pm)
Thanks Katrina,I,m assuming I'm to add your code snippet to one of my playDeathAnimation functions like so:
function AIBeast::playDeathAnimation(%this)
{
%death = getRandom(1,3);
%this.setActionThread("death"@%death, false, false);
%this.playThread(0,"death"@%death);
}
correct me if I'm wrong, also I use Milkshape to produce my models and I don't see a way to export .dsq files to compile a bots.cs file per your example. Is there a plugin for Milkshape or am I SOL?
#3
We use 3dsMAX 6.0 and I am the programmer for our game. So, I don't know anything about Milkshape. How are you doing your animations currently? You can use animations that are inside the DTS file as well and you don't need to change the code, but your animations should be named death1, death2, and death3. If you wanted to add more death animations you just need to change the 3 in the getRandom to the number of deaths you have.
12/22/2004 (2:55 am)
Hi Andrew,We use 3dsMAX 6.0 and I am the programmer for our game. So, I don't know anything about Milkshape. How are you doing your animations currently? You can use animations that are inside the DTS file as well and you don't need to change the code, but your animations should be named death1, death2, and death3. If you wanted to add more death animations you just need to change the 3 in the getRandom to the number of deaths you have.
#4
download the demo of the latest showtool... it will give you all the info about internal animations and naming... fire up the orc and see a good example
12/22/2004 (6:34 am)
Katrina is right... animations can be in your dts file (doesn't have to be seperate dsq files)...download the demo of the latest showtool... it will give you all the info about internal animations and naming... fire up the orc and see a good example
#5
I've done some experimenting and the only way I could get bots to run their death anims is if they are abstracted from the dts files as dsqs (using example files) and compiled as you've indicated. It's beyond my comprehension because my human avatars can run their anims fine from dts files. I've discovered that Milkshape dosen't yet support exportation of .dsq files. So I'll just have to live without my bots displaying their death gyrations because I can't afford 3D Studio Max.
12/23/2004 (8:10 am)
Thank you all for your advice. I've done some experimenting and the only way I could get bots to run their death anims is if they are abstracted from the dts files as dsqs (using example files) and compiled as you've indicated. It's beyond my comprehension because my human avatars can run their anims fine from dts files. I've discovered that Milkshape dosen't yet support exportation of .dsq files. So I'll just have to live without my bots displaying their death gyrations because I can't afford 3D Studio Max.
Katrina Rose
Default Studio Name
%death = getRandom(1,3); %this.setActionThread("death"@%death, false, false); %this.playThread(0,"death"@%death);In my bots.cs file I have:
When a bot is killed it plays death1, death2 or death3.
Marrion