How do I destroy an animation, but not the sprite?

0 favourites
  • 3 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • I have a sprite named Bob. Bob has 3 animations name Tom, Dick & Harry.

    'On Start Of Layout' the Tom, Dick & Harry animations are hidden at different points of the game. The player moves around and when the player finds, lets say Tom, and taps Tom, how do I just destroy Tom and not the other animations.

    I can't do 'on clicked object > destroy > Bob', because than all of Bob's animations are destroyed. I just need to destroy the animation that was tapped, just Tom.

    I can't find an option for 'on click/tap > destroy > just the specific animation of Bob's, that is named Tom'

    Thoughts?

    Thank you.

  • You can destroy an instance which plays a specific animation, just add a condition "Is playing".

    This code will destroy only the instance which was clicked:

    Mouse On Clicked Bob -> Bob Destroy
    

    This code will destroy the instance which was clicked, and only if it's playing "Tom" animation:

    Mouse On Clicked Bob
    Bob Is Playing "Tom" -> Bob Destroy
    
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)