Death Animation

0 favourites
  • 13 posts
From the Asset Store
4 Block Soldiers with different animations, 400x400
  • I'm new to construct 2 (4th day) and I can't quite figure out how to get my death animation to work. It seems to get stuck playing a few frames and not the whole animation. I tried just replacing the object with a new one of the death but the player just disappears. What i'm looking to do is play the death animation, stay on the last frame for a few seconds and then fade out. Any help would be greatly appreciated!

  • Add this to the event:

    I must say amazing work for a beginner.

  • Add this to the event:

    I must say amazing work for a beginner.

    Thank you! I actually have a background in game making but i'm not a programmer (well I help with minor code in C#) and this is something i'm doing without the team.

  • Add this to the event:

    I must say amazing work for a beginner.

    It worked but the animation loops 3 or 4 times before stopping. I suppose I need a boolean to turn off the shooting as well?

  • System..Trigger once while true

  • System..Trigger once while true

    Totally worked! Thank you sooo much!

  • One more question. It works as long as i'm not pushing any of the movement keys but if you are it just glitches and he just stands there. I thought that's what the inverted platform is moving would have fixed but I guess not?

  • You actually need to make some "state" to add as a condition in your "is falling" event.

    You can add a boolean "Alive" to your player object that will be kept true as long as it is alive. You can do the same by checking that Health's value is > 0.

    On the moment it dies, pass the boolean to False, it will make it so that only the death animation is played, entirely and not "short circuited" by the "falling"/"on landed" animation.

    See attached capx made in r189.

  • Thank you Kyatric you are the best! I've seen your tutorials and you have been very helpful in the forums!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You actually need to make some "state" to add as a condition in your "is falling" event.

    You can add a boolean "Alive" to your player object that will be kept true as long as it is alive. You can do the same by checking that Health's value is > 0.

    On the moment it dies, pass the boolean to False, it will make it so that only the death animation is played, entirely and not "short circuited" by the "falling"/"on landed" animation.

    See attached capx made in .

    Okay I think i'm doing this right but it works as long as i'm standing still... if the death animation starts playing and you push a movement key he ends up just standing there and then never dies.

  • ,,,,,,,,

  • Nevermind I got it all figured out now! Thanks!

  • Once again a question of several conditions and how events work. Remember, events sheet is read from top to bottom.

    Event 11 and 12 will modify your animation if the event is true. If you are moving your character when taking a fatal blow, the platform behavior will carry the momentum on the next tick, so "On platform moved" will be a true condition.

    To those events (11 and 12) add the "Is Alive" condition check as well.

    Also, on oversight took place in the event 48 make the condition "Health <= 0" not simply "= 0".

    And this should work as intended.

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