I'm trying to have a triggered XP system for 10 levels with custom level brackets, however I can't get the bracket or level to update correctly.
-
Initialisation
-
Events
- Map initialization
- Conditions
-
Actions
- -------- XP Setup --------
- Set XPBrackets[1] = 20
- Set XPBrackets[2] = 50
- Set XPBrackets[3] = 95
- Set XPBrackets[4] = 145
- Set XPBrackets[5] = 220
- Set XPBrackets[6] = 340
- Set XPBrackets[7] = 480
- Set XPBrackets[8] = 630
- Set XPBrackets[9] = 800
- Set XPBrackets[10] = 1000
-
Events
-
XP Update
-
Events
- Unit - A unit Dies
-
Conditions
- (Owner of (Killing unit)) Equal to Player 1 (Red)
-
Actions
- Set XP = (XP + ((Level of (Dying unit)) x 2))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- XP Greater than or equal to XPBrackets[Level]
- Level Less than 10
-
Then - Actions
- Set Level = (Level + 1)
- Multiboard - Set the text for Multiboard item in column 2, row 2 to (String(Level))
- Multiboard - Set the text for Multiboard item in column 3, row 5 to (|cffffcc00[|r + ((String(XP)) + (|cffffcc00/|r + ((String(XPBrackets[Level])) + |cffffcc00]|r))))
- Else - Actions
-
If - Conditions
- Multiboard - Set the text for Multiboard item in column 3, row 5 to (|cffffcc00[|r + ((String(XP)) + (|cffffcc00/|r + ((String(XPBrackets[Level])) + |cffffcc00]|r))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- XP Greater than 1000
-
Then - Actions
- Set XP = 1000
- Multiboard - Set the text for Multiboard item in column 3, row 5 to |cffffcc00[|r1000|c...
- Else - Actions
-
If - Conditions
-
Events