AnimationDone
by Drew Madsen · in Torque Game Engine · 08/13/2009 (10:14 pm) · 2 replies
I'm attempting to make a melee system with as little source code editing as possible.
I have a system thought out.
I need to check the distances on the melee weapon while it is in the slash animation.
My problem is I can't find a way to detect when the animation ends.
I really need the function to be generic.
I've seen this on the forums:
Armor::animationdone(%this,%obj)
{
Echo("Sequence Done");
}
But I don't know how it works.
I've tried using many ways, replacing armor with the animation name, the player DB, and others yet it never echos when I $player.setactionthread(slash,0,0);
I've spent hours trying to find a solution. Any assistance will be very appreciated.
Thoughts comments?
I have a system thought out.
I need to check the distances on the melee weapon while it is in the slash animation.
My problem is I can't find a way to detect when the animation ends.
I really need the function to be generic.
I've seen this on the forums:
Armor::animationdone(%this,%obj)
{
Echo("Sequence Done");
}
But I don't know how it works.
I've tried using many ways, replacing armor with the animation name, the player DB, and others yet it never echos when I $player.setactionthread(slash,0,0);
I've spent hours trying to find a solution. Any assistance will be very appreciated.
Thoughts comments?
About the author
#2
So far no luck getting the "armor::animationDone" call back that should be occuring whenever a sequence greater than the base set is called in setactionthread.
I seem to have it working now on the player.
Setup like this playerdata::AnimationDone(%this,%obj)
when using the setactionthead(A,b,C) A is the sequence, B is Hold or not, C seems to be related to checking to return callback. when it is 0 it doesn't call back, when it is >0 it does.
I'll update if I continue to have problems.
08/14/2009 (5:38 am)
Unfortunately in my experience Playthread messes up blending on characters. Which Torque seems to recognize the end of playthread Sequences.So far no luck getting the "armor::animationDone" call back that should be occuring whenever a sequence greater than the base set is called in setactionthread.
I seem to have it working now on the player.
Setup like this playerdata::AnimationDone(%this,%obj)
when using the setactionthead(A,b,C) A is the sequence, B is Hold or not, C seems to be related to checking to return callback. when it is 0 it doesn't call back, when it is >0 it does.
I'll update if I continue to have problems.
Torque Owner Rex
BrokeAss Games
Also,try calling the functions on the player ID of the object instance you want it working on.....