So I'm trying to make a leaderboard for my map, and it manages the lives of each player.
I tried a few things several times, but I can't manage to get them to work.
Here's the triggers:
Anyways, what the leaderboard is SUPPOSED to do, is show each player that IS in the game, as a user, not a computer or empty slot, and keep track of their lives. But I can't get it to update
So, when I die and revive, it doesn't change the lives in the leaderboard, even though I have the trigger to change the values when I die.
My revive trigger:
any ideas on what I need to do?
I tried a few things several times, but I can't manage to get them to work.
Here's the triggers:
-
Leaderboard
-

Events
-


Time - Elapsed game time is 0.01 seconds
-
-

Conditions
-

Actions
-


Leaderboard - Create a leaderboard for (All players controlled by a User player) titled |cff0000FF Maze of ...
-


Set Leaderboard = (Last created leaderboard)
-


For each (Integer A) from 1 to 10, do (Actions)
-



Loop - Actions
-




Leaderboard - Add PlayerVar[(Integer A)] to Leaderboard with label (Name of PlayerVar[(Integer A)]) and value Lives[(Integer A)]
-
-
-
-
-
Lives
-

Events
-


Unit - A unit Dies
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Dying unit) Equal to DemonHunterVar
-
-



Then - Actions
-




For each (Integer A) from 1 to 10, do (Actions)
-





Loop - Actions
-






Set Lives[(Integer A)] = (IntegerVar - 1)
-






Set IntegerVar = Lives[(Integer A)]
-






Leaderboard - Change the value for PlayerVar[(Integer A)] in Leaderboard to (Lives[(Integer A)] - 1)
-






Game - Display to (All players) for 3.00 seconds the text: ((Name of PlayerVar[(Integer A)]) + ( has died and has + ((String(Lives[(Integer A)])) + lives left.)))
-
-
-
-



Else - Actions
-
-
-
-
Set PlayerVar[(Integer A)] = (Player((Integer A)))
-
Unit - Create 1 Demon Hunter for PlayerVar[(Integer A)] at TempPointVar[1] facing RealVar[(Integer A)] degrees
-
Set HeroArrayVar[(Integer A)] = (Last created unit)
-
Set DemonHunterGroupVar = (Units owned by PlayerVar[(Integer A)])
Anyways, what the leaderboard is SUPPOSED to do, is show each player that IS in the game, as a user, not a computer or empty slot, and keep track of their lives. But I can't get it to update

So, when I die and revive, it doesn't change the lives in the leaderboard, even though I have the trigger to change the values when I die.
My revive trigger:
-
Revive
-

Events
-


Unit - A unit Dies
-
-

Conditions
-

Actions
-


For each (Integer A) from 1 to 10, do (Actions)
-



Loop - Actions
-




Wait 1.00 seconds
-




Hero - Instantly revive (Dying unit) at RevivePointVar, Hide revival graphics
-




Selection - Select (Dying unit) for (Owner of (Dying unit))
-
-
-
-
