make this player respond to death

  • Hey Guys/Gals

    I have attached a capx file for viewing.... something I'm battling right now in a game I'm creating is that when the player comes in contact with the enemy I have a nice little animation of him dying.... problem is and illustrated in this is capx is that if I keep pressing something after touching the enemy he simply goes into another animation and the game keeps going.. how can I have the dying animation play out then be done with the level restart the layout... I tried turning collision off after making contact but that in return drops the boss of the platform? if that makes sense thats what happen.... I tried setting up VAR's to track if he has been touched by the boss and if he has to enter him into a dying mode and if not he is in alive mode but that got messy... any ideas?

  • Change the condition "On collision" for "Is overlapping" and on this same event, add the platform action "Set Enabled " and set it to Disabled.

    That will make the player unable to move while is touching the enemy.

  • Ok so this did work to a certain point however it plays the death animation but still if I press left or right he jumps back up ( dont move) but gets into another animation position

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok well strange enough I was doing this on my actual project and the result was the above - however doing this on the sample I provided has the player not taking any input after he hits enemy... so what do I have in my project that is making him bounce back to life....

  • Try moving the event "player is overlapping with enemy" to the bottom of the event sheet. It needs to be below the events that control "key is down".

  • player is overlapping enemy is the last entry in the events... number#26 already?

  • Can you share the .capx?

  • ok so here how I finally got around this - all keyboard input is now tied to a boolean alive... when he makes contact with enemy boolean set to false and all input to animations is killed....

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