Extra Life by Score

2 favourites
  • 5 posts
From the Asset Store
A platform game full of content for you to use however you want
  • 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.

    Please help me...

  • 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.

  • 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 :)

  • Try Construct 3

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

    Try Now 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 :)

    ?

  • Thanks Plink, Thanks Vinnie,

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