How do I trigger 2 animation loops upon collision, and have it be repeatable each collision after that?
I managed to get it to play the animation on collision, but it either keeps looping after that, or if I don’t have the loop checked in the sprite animation, it just plays once. It doesn’t trigger again when it collides again.
I’d like it to loop 2 (or 3) times. I could just build that into the animation and set it not to loop, but either way, I can’t seem to get it to trigger when they collide again after that.
The easiest is to uncheck the loop option in the animation, and repeat the frames in the animation definition. So you’ll end up the frame sequence repeated 2 or 3 times within the animation.
Another is to uncheck the loop option in the animation and add object variable to keep track of how many times the animation has been run. Using the condition to check the animation has finished, decrease the object variable and replay the animation if the desired number of iterations hasn’t been met.
Do you mean for the first option I suggested? That’s in the object’s animation. Check all the frames you want to copy, then right click and select “Duplicate selection” :