Is there a way to convert Experience into percentages?
I've been playing with it, and I cannot get it to work regardless of how I do it.
I've got the EXP of the hero in a variable, the EXP needed for the level as a variable, and I convert it in a formula, but for some reason I don't get a result with the formula.
That's what I've done. I can't figure out why it does not work. Any suggestions or fixes?
I've been playing with it, and I cannot get it to work regardless of how I do it.
I've got the EXP of the hero in a variable, the EXP needed for the level as a variable, and I convert it in a formula, but for some reason I don't get a result with the formula.
-
Initialization
-
Events
- Map initialization
- Conditions
-
Actions
- Set Hero[1] = Blademaster 0000 <gen>
- Set Hero[2] = Death Knight 0002 <gen>
- Set Hero[3] = Demon Hunter 0001 <gen>
- Set Hero[4] = Blood Mage 0003 <gen>
- Set MaxEXPLvl[1] = 200
- Set MaxEXPLvl[2] = 500
- Set MaxEXPLvl[3] = 900
- Set MaxEXPLvl[4] = 1400
- Set MaxEXPLvl[5] = 2000
- Set MaxEXPLvl[6] = 2700
- Set MaxEXPLvl[7] = 3500
- Set MaxEXPLvl[8] = 4400
- Set MaxEXPLvl[9] = 5400
-
Events
-
EXP
-
Events
- Time - Every 0.05 seconds of game time
- Conditions
-
Actions
-
Set EXPLoop = (MB_loop[1] - 1)
-
Do Multiple ActionsFor each (Integer loopA) from 1 to EXPLoop, do (Actions)
-
Loop - Actions
- Set EXPHero[loopA] = (Hero experience of Hero[loopA])
- Set EXP_PercentHero[loopA] = ((EXPHero[loopA] / MaxEXPLvl[(Hero level of Hero[loopA])]) x 100)
- Set EXP_Percent[loopA] = (String(EXP_PercentHero[loopA]))
-
Loop - Actions
-
Do Multiple ActionsFor each (Integer loopA) from 1 to EXPLoop, do (Actions)
-
Set EXPLoop = (MB_loop[1] - 1)
-
Events
That's what I've done. I can't figure out why it does not work. Any suggestions or fixes?