Extra Life per So Many Points?

For questions about using Classic.

Post » Sat Jan 23, 2010 5:34 pm

[quote="Mipey":24w40yj9]What if you are at 19999 points and gain 10 points? It skips over 20000, which means the above condition is only run if you hit exactly 20000, 40000 or 60000 score.[/quote:24w40yj9]
Heh, I had never even considered that. :P
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,126

Post » Sat Jan 23, 2010 5:49 pm

Thank you very much everybody. All of your info was very helpful, so I should be able to make something out of it! Time to try it out...
B
2
S
1
G
5
Posts: 14
Reputation: 1,428

Post » Mon Jan 25, 2010 6:16 am

[quote="linkman2004":25ubd4h2][quote="Guyon":25ubd4h2]No... Just look at my example, it is all in the math

EarnedLives:

int(global('EarnedExp') / 20000)+1[/quote:25ubd4h2]
That method won't work properly. Since the amount of lives you have is directly tied to the amount of experience(or points) you have, losing lives won't work properly. You'll just gain back any lives you lost the instant that expression is used again. :P

Doppel's method is the best. However, the more conventional way of using modulus in this case would be:

If Score % 20000 = 0[/quote:25ubd4h2]


Actually my expression works great. When you RP you need to know the MAX lives for a a set Experience lever so. But you also set a TempLives up.
This way you can subtract TempLives, but say you get a potion to gain lives back. My way you will still see the ceiling for how may lives you can gain back.
B
29
S
8
G
8
Posts: 531
Reputation: 7,181

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests