How do I die?

0 favourites
  • 12 posts
  • Hello,

    I have followed the beginner platformer guide and made the player flash when hitting the enemy instead of dying.

    I just can't find a way to make it die

    Thank you in advance.

  • play a die animation, and when the animation finishes, subtract 1 from some life global value and reset the layout....basically... but of course, it depends on the exact behavior you're after.

    -Mike

  • I added this health instance variables to my Mario character and set it to 1.

    But I don't see any response when touching the enemies.

    If this pic enough to tell or if it's better to upload a capx file?

    Thank you so much.

  • Why would you see a response? You're just setting a variable, you need to make the players sprite react somehow, like play a getting hit animation etc.

    cheers,

    Mike

  • PS, have you seen this? You might be able to learn a lot from it.

    Subscribe to Construct videos now

    cheers,

    Mike

  • Why would you see a response? You're just setting a variable, you need to make the players sprite react somehow, like play a getting hit animation etc.

    cheers,

    Mike

    I meant I don't see my character die after setting it. Anyway, I'm going to watch the youtube video. I have a lot to learn.

    Thank you.

  • You need an action that makes the player play a death animation etc once "health" is less or equal to zero... C2 wont automatically invent an entire death sequence for you.

    best of luck,

    cheers,

    Mike

  • You need an action that makes the player play a death animation etc once "health" is less or equal to zero... C2 wont automatically invent an entire death sequence for you.

    best of luck,

    cheers,

    Mike

    Yes I know. I will skip the dead animation for now. Just want my character die, minus a life, spawn in the beginning of the stage.

    But I just don't know how to make it die.

    I upload my capx file, would you mind to check if my events missing something?

  • Player on collision with enemy ----- Subtract 1 from health

    Health = 0 ------ Player destroy - And show text "You Lose" Then restart layout

  • Player on collision with enemy ----- Subtract 1 from health

    Health = 0 ------ Player destroy - And show text "You Lose" Then restart layout

    Thanks so much! Now I understand the logic slowly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are full platform tutorial course on scirra channel :

    http://www.youtube.com/user/ScirraVideos/videos

  • There are full platform tutorial course on scirra channel :

    Thanks so much!

    I like the videos!

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