This snippet of a trigger should find the percentage a player is towards the next level. it is run at the bottom of the xp updating trigger. however it is giving me values of 0 every time, as far as I can tell it should be working out but it's probably an obvious overlook on my part. (the else part was only added because I though it might be bugging out using XPBrackets[0] which isn't set.)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Level Greater than 1
-
-
Then - Actions
-
Set tmpInt = (XPBrackets[Level] - XPBrackets[(Level - 1)])
-
Game - Display to (All players) for 30.00 seconds the text: (String(tmpInt))
-
Set XPPercent = ((XP - XPBrackets[(Level - 1)]) / tmpInt)
-
Set XPPercent = (XPPercent x 10)
-
Game - Display to (All players) for 30.00 seconds the text: (String(XPPercent))
-
Multiboard - Set the text for Multiboard item in column 2, row 5 to XPBar[XPPercent]
-
-
Else - Actions
-
Set XPPercent = (XP / XPBrackets[1])
-
Set XPPercent = (XPPercent x 10)
-
Game - Display to (All players) for 30.00 seconds the text: (String(XPPercent))
-
Multiboard - Set the text for Multiboard item in column 2, row 5 to XPBar[XPPercent]
-
-