need help with setting up 2 player death

0 favourites
  • 4 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Not sure the easiest way to proceed, and im not even sure on the terminology to look for what im trying to do.

    i have 2 players that play using the keyboard.

    i want a system like cloudberry kingdom on wii u,

    where the players share lives, so while playing a layout, if one dies, the other can keep going and beat the level, at no cost to the lives "pot"

    but if both die, then a life is lost and the layout is reset.

    i'm not even sure how to implement that.

    what i thought (and there is probably an easier way)

    is to have a bool on the players, that is constatly checked, so that when a character dies, the bool isdead = true

    and then a constant loop seeing if the isdead is true for both.

    but I have NO idea how to set this up in the events.

    I just need a push in the right direction and i think i could manage the rest. unless someone wants to selflessly explain word for word how to do this :)

    Thanks for you time reading this,

    Gathos.

  • How about a global variable? 1= both active 2= Player one dead 3=player two dead 4= both dead

    With such a system, you can easily share lifes etc:)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Give a variable to each player called "active"

    When they spawn set active to 1

    When they die, set "active" to 0

    system player1.active=0 AND player2.active=0 -> end game

  • thank you this sounds just like what I need thanks. I already have the variables setup for i just could wrap my head around what i should do with them, i guess i just had a major brain fart thanks justifun.

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