Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Level up equation calculating levels using the current exp requirement and not the proceeding ones?

Asked by
SWX253 2
4 years ago
Edited 4 years ago

I'm working on an RPG leveling formula. Whenever the player gets enough exp (The level * 25), they level up. This is the equation I currently have:

Level = Level + XP / (Level * 25)

The issue is if the player is level 1 and gains 75 exp, they'll be level 4 when they should only be level 3 since if you are level 2, the exp requirement would be (level * 25) aka 50 and if you are level 1, the exp requirement would be (level * 25) aka 25, equating to 75 exp required to get to level 3. The equation treats the player as if they're level 1. How can I fix this?

0
Could you post a bit more of the script? The equation should work, it must be something else LeedleLeeRocket 1257 — 4y
0
The issue certainly stems from the equation. If you define level as 1 and xp as 75, and then put the equation under it, printing level, you'll find the level is 4 and not 3. SWX253 2 — 4y

Answer this question