# Extra Life by Score

2 favourites
• 5 posts
• Hi Guys, I'm new here, and I have a question,

I'm trying to get to a certain amount of points give you an extra life.

For example:

Every 30,000 points you earn an extra life.

How do I make this happen with multiples also, like 60 000, 90 000, etc.

• I find the best way to do this is to have 2 variables, one is your score, one is to track lives we'll call it score2.

As you gain points add them to both variables.

When score2 greater or equal to 30,000, add 1 to lives, subtract 30,000 from score2.

The subtract resolves any remainder issues if it creeps over 30,000 say 30,500, score2 would then become 500.

• ## Try Construct 3

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

Construct 3 users don't see these ads
• Yeah what plinkie is saying is 3 Variables

• Lives
• Score
• Score2

Everytime you gain points make it add to both Score and Score2. Then make a seperate event When Score2 is equal or greater to 30,000 subtract 30,000 and add 1 to Lives. That way Score2 will always be somewhere between 0 and 30,000 but the main Score variable is always increasing and indicative of your total Score :)

• Yeah what plinkie is saying is 3 Variables

• Lives
• Score
• Score2

Everytime you gain points make it add to both Score and Score2. Then make a seperate event When Score2 is equal or greater to 30,000 subtract 30,000 and add 1 to Lives. That way Score2 will always be somewhere between 0 and 30,000 but the main Score variable is always increasing and indicative of your total Score :)

?