Life/ stamina help

Get help using Construct 2

Post » Fri Oct 18, 2013 3:38 pm

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.
Posts: 1
Reputation: 152

Post » Fri Oct 18, 2013 3:53 pm

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.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
Posts: 6,160
Reputation: 19,775

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests