How to keep an animation on a frame?

So Im trying to create a health bar but the problem is In my game you get money over time and once you get 100$ you can buy one soldier that does damage to the enemy untill the soldier dies (all just an animation of the bar going lower over time) Once your soldier dies it should stop doing damage to the enemy (animation stops looping) but it either continues or it will stop but reset to full health (the first frame) Im trying to make it stop on the frame where it was after your soldier dies. Ive tried all the inputs but cant get it right.

heres my game if you need a better understanding of what i mean http://flowlab.io/game/play/977910

Hey Sero,

Instead of your Mailbox “hp” starting the animation make it go up a frame each time it receives a message.

Like this:
qqqq

The first number is quanity of frames you want to add each time he receives the message.
The second number is current frame number.

Btw you will enconuter another issue when you do this because something is toggling off the switch. You will have to delete it in order to work.

Also If you want to make the soldier attack multiplous times add a timer in repeat until the unit dies.

Hope this helped and never stop Creating :wink:

Hey Sero,

Instead of your Mailbox “hp” starting the animation make it go up a frame each time it receives a message.

Like this:
qqqq

The first number is quanity of frames you want to add each time he receives the message.
The second number is current frame number.

Btw you will enconuter another issue when you do this because something is toggling off the switch. You will have to delete it in order to work.

Also If you want to make the soldier attack multiplous times add a timer in repeat until the unit dies.

Hope this helped and never stop Creating :wink:

Hey thanks so much man :slight_smile: I love making stuff