I am using Mireben's excellent animation class (
http://forum.thegamecreators.com/?m=forum_view&t=185664&b=22). The problem arises as you have to call "object.animate()" every frame for every object where as "dbPlayObject" you only have to call once (which was nice, if it wasn't broken
). I can't get the animation to play only once, I tried doing
if (dbMouseClick() == 1 && ShootTimer < 10)
{
isAnimating = true;
ShootTimer = 0;
}
if (isAnimating == true && ShootTimer < 10)
{
obj.animateObject(curTime);
ShootTimer++;
}
And it played the animation once but If I reset the "isAnimating" varible it would animate again (and it is a hassle to find the "ShootTimer" values for each weapon
)
I was wondering if anyone had any idea's on how to play it only once for each click of the mouse.