0 Favourites

Life/ stamina help

  • Hi all.

    I'm new to the forums but have gotten petty comfortable with construct and am well on my way to completing my first game.

    My question is how do I create a life system similar to candy crush or puzzle and dragons where it costs a life or certain amount of stamina to play a level and your lives replenish over a time period unless you buy more etc.

    I've looked everywhere and can't find help. All your knowledge is much appreciated.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • The easy part is deducting lives if level is not completed.

    You'd need a global variable for the amount of lives you have and deduct 1 from it if the level is played unsuccesfully.

    The harder part is the replenishing part, at least if you want the replenishing to continue if the game is not running. Construct 2 doesn't have a possibility to see how much time has past between close and start. There is a plugin for system time you could use to get just that information.

    The replenishing itself could be done with a sytem every x seconds or a timer behaviour adding 1 to the amount of lives after a certain amount of time has past.

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