How to stop an animation?


  • Posts: 94

I've created a power bar that goes up and down. The mechanics of my game work by pressing the mouse button a ball is fired in the direction of a rotating arrow. I've got so far that when I press the mouse the arrow stops moving, however when I press the mouse again the power bar keeps going up and down! I've tried all kinds of jiggery pokery but it just isn't playing ball. I have attached the code blocks for the test level and the code for the power bar plus the current state of the game so you can see more clearly what is occurring!

Or is there another way of stopping an animation?
Any help would be greatly appreciated as always! John


  • *
  • Posts: 2250
I think it's because your custom go event is set to run every 0.1 seconds so they'll continue to do that.

Instead, at the end put a do after  0.1 event that checks if the event should be triggered again or not.

Have you not thought about using a drawn object instead of an actor?


  • Posts: 94
Thanks Jeffrey - yes you were right.

I took out the do every 0.1 second and at the end of the block I triggered the event again. Code is attached if you are interested!