The last time I begged for help here I got it, fast. Real fast in fact.
So ta da! Like a trained monkey here I am again to beg for help.
I'm working on the asteroids project from the greenfoot book scenarios. I've given my ship a modifier called "Structure" that essentially functions as life. I've made it so that each time the ship hits an asteroid, it's structure is reduced in a blaze of sparks (new images) sound effects (Mega Man X be blessed) and a physical counter on the screen that shows how much structure is left.
My problem is this: I want the animation for the damage to execute just one time. Right now, it only executes as long as an asteroid is detected on the rocket. What I want it to do is literally execute the code for about 2 seconds and then revert back to the original image.
I can't seem to do it. Anyone every try something like this?
![Twitter](/assets/twitter-4e19209ef84344ee0c433f4c7bad8d49.png)
![Twitter.hover](/assets/twitter.hover-1fb19a5bafc50deace8f88eaec867845.png)