Animation management - please help
by Hadas Noam · in Torque Developer Network · 02/07/2011 (12:47 pm) · 0 replies
Hello! Thank you for looking :)
I've been trying to adjust the basic platformer from the tutorial with abilities. First I have the function the the keybind, then later on update, it checks casting.
function playerCastInvs()
{
if(!$mina.casting)
{
$mina.casting = true;
}
}
if(%this.casting)
{
%this.playAnimation(minaCastInvs);
if (%this.getAnimationName() $= "minaCastInvs")
{
if(%this.getIsAnimationFinished())
{
$mina.casting = false;
%this.playAnimation(minaStand);
}
}
return;
}
I'm sorry if it's so crude. I have very little programming experience but I really want to make this work. What is the difference between setAnimation and playAnimation, anyway?
What it currently does is gets stuck on the first frame of minaCastInvs animation and messes up the other animations. I'm guessing it simply replays it, thus showing only the first frame. How do I go about fixing that?
Thank you muchos
Hadas
I've been trying to adjust the basic platformer from the tutorial with abilities. First I have the function the the keybind, then later on update, it checks casting.
function playerCastInvs()
{
if(!$mina.casting)
{
$mina.casting = true;
}
}
if(%this.casting)
{
%this.playAnimation(minaCastInvs);
if (%this.getAnimationName() $= "minaCastInvs")
{
if(%this.getIsAnimationFinished())
{
$mina.casting = false;
%this.playAnimation(minaStand);
}
}
return;
}
I'm sorry if it's so crude. I have very little programming experience but I really want to make this work. What is the difference between setAnimation and playAnimation, anyway?
What it currently does is gets stuck on the first frame of minaCastInvs animation and messes up the other animations. I'm guessing it simply replays it, thus showing only the first frame. How do I go about fixing that?
Thank you muchos
Hadas