try it this way (sorry for hard to read text)
Global variable :
DeadTimer[1-12] // one timer per player
DisplayTimer // only need one timer for everyone
Player_hero[1-12] // one hero per player
UnitGroup_DeadHero // keep a list of dead hero waiting for revive
// this trigger will keep running,
// it do nothing if UnitGroup_DeadHero is empty
Game Start :
Countdown Timer - Start DisplayTimer as a Period timer every 1 second.
Trigger 1
Trigger - Unit die
Condition - Triggering Unit is a Hero
Action:
set temp_integer = player number of triggering player
Countdown Timer - Start DeadTimer[temp_integer ] as a One-shot timer that will expire in 10.00 seconds
add triggering unit to UnitGroup_DeadHero
// this trigger will display floating text above every dead hero's head
// every player have their own DeadTimmer with difference remaining time
// this trigger do nothing if UnitGroup_DeadHero is empty
Trigger 2:
event : timer expired
condition :
- expired timer = DisplayTimer
- count unit in UnitGroup_DeadHero > 0
Action :
pick every unit in UnitGroup_DeadHero do
-set temp_integer = player number of (owner of pick unit)
-display floating text(Remaining time for DeadTimer[temp_integer]) above pick unit
// this trigger will revive the dead hero
// every player have their own DeadTimmer so you know which hero to revive
Trigger 3:
event : Timer expired
condition :
expired timer = DeadTimer[1]
action:
pause DeadTimer[1]
revive the Player_hero[1]
remove Player_hero[1] from UnitGroup_DeadHero
and copy trigger 3 for DeadTimer[2], DeadTimer[3]...DeadTimer[12]