- Joined
- May 15, 2009
- Messages
- 192
Hello fellow members, it's Battlehound asking for help again.
This trigger im making works alright - the first time it runs. What is supposed to do is; whenever something dies near a specific hero (BAR_Ram_U) he will gain additional armor for X seconds. This all works very fine, but the problem is, I need the timer that counts down towards the removal of the armor, to be somewhat resat whenever something dies.
'Cause if two additional units die whilst the armor buff is active, the old timer will still be running, and they will yield nothing. And for whatever reason, the trigger completely stops working after functioning once.
So yeah, im pretty lost. Help is much appreciated.
This trigger im making works alright - the first time it runs. What is supposed to do is; whenever something dies near a specific hero (BAR_Ram_U) he will gain additional armor for X seconds. This all works very fine, but the problem is, I need the timer that counts down towards the removal of the armor, to be somewhat resat whenever something dies.
'Cause if two additional units die whilst the armor buff is active, the old timer will still be running, and they will yield nothing. And for whatever reason, the trigger completely stops working after functioning once.
So yeah, im pretty lost. Help is much appreciated.
-
Rampage Per Die
-
Events
- Unit - A unit Dies
- Conditions
-
Actions
- Set BAR_Ram_Tempp = (Position of (Triggering unit))
-
Unit Group - Pick every unit in (Units within 900.00 of BAR_Ram_Tempp matching ((Matching unit) Equal to BAR_Ram_U)) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to BAR_Ram_Tempg
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in BAR_Ram_Tempg) Equal to 1
-
Then - Actions
- Unit - Add Rampage Armor Bonus to BAR_Ram_U
- Unit - Set level of Rampage Armor Bonus for BAR_Ram_U to (Level of Rampage for BAR_Ram_U)
- Countdown Timer - Start BAR_Ram_Timer as a One-shot timer that will expire in (4.00 + (Real((Level of Rampage for BAR_Ram_U)))) seconds
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_BAR_Ram_Tempp)
- Custom script: call DestroyGroup(udg_BAR_Ram_Tempg)
- Trigger - Turn off (This trigger)
-
Events
-
Rampage Remove
-
Events
- Time - BAR_Ram_Timer expires
- Conditions
-
Actions
- Unit - Remove Rampage Armor Bonus from BAR_Ram_U
- Trigger - Turn on Rampage Per Die <gen>
-
Events