Because the trigger once 'On animation finish' can not use in the loop condition, so that I find another method instead. But my method seems to be not neat.
I use Compare frame = Selft.AnimationFrameCount -1 and add one more blank frame to animation.
Would someone tell me others better method? I don't want to add a blank frame to animation.
Thank you very much!
I'm not really understanding the post but is there any reason why you can't compare frame to the last frame of the animation?
You can add an instance variable "animationIsFinished" and set it to true in "On finished" event. And then check this variable in your loop.
Hi Plinkie. If compare to the last frame, it will be active when the last frame just appear. But I need them active after finishing the last frame. That is the difference, I think.
Hi dop2000. That is a great idea :D I will try it.
Thank you guys!
Develop games in your browser. Powerful, performant & highly capable.
Ah I see, well based on that info I think the blank frame is a good workaround, but I can see how that would get annoying to do if you are applying the logic to many animations across many objects. Good luck!