- Joined
- Oct 20, 2019
- Messages
- 60
Hello
I have some triggers for reviving heroes that does not work as intended and i could need some help to locate the problem and hopefully fix it
The problems that i've encountered so far is that if theres multiple heroes dead at the same time, then they will all revive at the same time when the shortest revive timer expires (so it seems atleast), also only one timer window gets destroyed if theres multiple up at the same time
The triggers are supposed to function for two teams, each has 1-5 players in it, up to 10 players total and i hope you see what i would like to accomplish with these triggers
Thank you for your help
I have some triggers for reviving heroes that does not work as intended and i could need some help to locate the problem and hopefully fix it
The problems that i've encountered so far is that if theres multiple heroes dead at the same time, then they will all revive at the same time when the shortest revive timer expires (so it seems atleast), also only one timer window gets destroyed if theres multiple up at the same time
The triggers are supposed to function for two teams, each has 1-5 players in it, up to 10 players total and i hope you see what i would like to accomplish with these triggers
Thank you for your help
-
Hero Revival Part 1
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
-
Actions
-
Set VariableSet HeroRevivalInteger = (Player number of (Owner of (Triggering unit)))
-
Set VariableSet HeroToRevive[HeroRevivalInteger] = (Triggering unit)
-
Set VariableSet HeroReviveTimeFactor = 3.00
-
Unit Group - Add HeroToRevive[HeroRevivalInteger] to RevivableHeroesGroup
-
Set VariableSet HeroReviveTime = (((Real((Hero level of HeroToRevive[HeroRevivalInteger]))) x HeroReviveTimeFactor) + 7.00)
-
Countdown Timer - Start HeroRevivalTimer[HeroRevivalInteger] as a One-shot timer that will expire in HeroReviveTime seconds
-
Countdown Timer - Create a timer window for HeroRevivalTimer[HeroRevivalInteger] with title (Name of HeroToRevive[HeroRevivalInteger])
-
Set VariableSet HeroRevivalTimerWindow[HeroRevivalInteger] = (Last created timer window)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Owner of HeroToRevive[HeroRevivalInteger]) is in PlayerGroupLeft.) Equal to True
-
-
Then - Actions
-
Player Group - Pick every player in PlayerGroupLeft and do (Countdown Timer - Show HeroRevivalTimerWindow[HeroRevivalInteger] for (Picked player))
-
-
Else - Actions
-
Player Group - Pick every player in PlayerGroupRight and do (Countdown Timer - Show HeroRevivalTimerWindow[HeroRevivalInteger] for (Picked player))
-
-
-
-
-
Hero Revival Part 2
-
Events
-
Time - HeroRevivalTimer[1] expires
-
Time - HeroRevivalTimer[2] expires
-
Time - HeroRevivalTimer[3] expires
-
Time - HeroRevivalTimer[4] expires
-
Time - HeroRevivalTimer[5] expires
-
Time - HeroRevivalTimer[6] expires
-
Time - HeroRevivalTimer[7] expires
-
Time - HeroRevivalTimer[8] expires
-
Time - HeroRevivalTimer[9] expires
-
Time - HeroRevivalTimer[10] expires
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in RevivableHeroesGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Remaining time for HeroRevivalTimer[(Player number of (Owner of (Picked unit)))]) Less than 1.00
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Owner of (Picked unit)) is in PlayerGroupLeft.) Equal to True
-
-
Then - Actions
-
Unit Group - Remove (Picked unit) from RevivableHeroesGroup.
-
Player Group - Pick every player in PlayerGroupLeft and do (Countdown Timer - Hide HeroRevivalTimerWindow[HeroRevivalInteger] for (Picked player))
-
Countdown Timer - Destroy HeroRevivalTimerWindow[HeroRevivalInteger]
-
Set VariableSet HeroReviveLocationLeft = (Center of Respawn Dead Hero 1 to 5 <gen>)
-
Hero - Instantly revive (Picked unit) at HeroReviveLocationLeft, Show revival graphics
-
Unit - Set mana of (Picked unit) to 100.00%
-
Camera - Pan camera for (Owner of (Picked unit)) to HeroReviveLocationLeft over 1.00 seconds
-
Custom script: call RemoveLocation(udg_HeroReviveLocationLeft)
-
-
Else - Actions
-
Unit Group - Remove (Picked unit) from RevivableHeroesGroup.
-
Player Group - Pick every player in PlayerGroupRight and do (Countdown Timer - Hide HeroRevivalTimerWindow[HeroRevivalInteger] for (Picked player))
-
Countdown Timer - Destroy HeroRevivalTimerWindow[HeroRevivalInteger]
-
Set VariableSet HeroReviveLocationRight = (Center of Respawn Dead Hero 6 to 10 <gen>)
-
Hero - Instantly revive (Picked unit) at HeroReviveLocationRight, Show revival graphics
-
Unit - Set mana of (Picked unit) to 100.00%
-
Camera - Pan camera for (Owner of (Picked unit)) to HeroReviveLocationRight over 1.00 seconds
-
Custom script: call RemoveLocation(udg_HeroReviveLocationRight)
-
-
-
-
Else - Actions
-
-
-
-
-