Hello everybody, I have a specific question and I hope I'll be as clear as possible:
In my game, I have several levels. For each level you pass, you gain a certain amount of XP. Then, I want the sum of those XP's to show in the level screen.
Example: XP_total = levelxp1 + levelxp2, and so on.
I did that with the "For each X element" >> Add levelxp.CurValue to XP_total" .
I already managed to do that perfectly, but here comes my problem: I want to implement some boosters to buy with the XP you gain.
Example: Booster "Nitro" costs 50 XP. So, I subtract the 50 XP from XP_total. But, when I go back playing the game, it re-calculates the sum of all levelxp's, and it forgets the subtraction I did.
I already tried to create another instance variable that is equal to XP_total, but it doesn't work properly.
If somebody could help me, it'll be very much appreciated!