Menu

Dieing

2005-02-14
2012-12-25
  • Nobody/Anonymous

    How do make it so that when you shoot an enemy he dies using a death animation, and once the animation is done how do you stop it so it doesn't repeat itself.

     
    • Nobody/Anonymous

      This has been answered in other posts.  Search around and you'll find a more detailed answer than the one I'm about to give:

      On the sprite collision between the bullet and the enemy, make sure the enemy is sprite a and the bullet is sprite b.

      Then, activate a special function (in the dropdown list) that is specific to sprite a (for example <ATemplate>*)

      Then, create the special function (named propperly) which creates the sprite w/ dying animation at a position of 0,0 relative to the trigger point.

      When you make the sprite, put it on a path with a single point and a delay that's long enough for the animation to play through exactly once before the path starts over again.  Then, tell the sprite to follow the path relative to the starting point, and tell it at End Of Path, delete the sprite.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.