- Joined
- Nov 13, 2006
- Messages
- 1,814
i want make a % Hp buff, but i am lost a bit with how to disable the bonus hp, i think wait not the best option if we talk about aoe buff (like make roar then remove it after 45 sec), i tryed timer way but idk how could identify what timer expired coz in 2nd trigger what remove the buff in event i must give the fixed array index for timer :/
-
Untitled Trigger 006
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Ability being cast) Equal to HP buff
-
Actions
- Set TempPoint = (Position of (Triggering unit))
- Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
- Unit - Add Dummy HP buff to (Last created unit)
- Unit - Order (Last created unit) to Night Elf Druid Of The Claw - Roar
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Wait 1.00 seconds
- Set TempPoint = (Position of (Triggering unit))
- Set TempUnitGroup = (Units within 600.00 of TempPoint matching (((Matching unit) has buff HP buff ) Equal to True))
-
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
-
Loop - Actions
- Set Max_HP = (Integer((Life of (Picked unit))))
- Set Buff_Value[(((Player number of (Owner of (Picked unit))) x 30) + 8)] = (Integer(((Real(Max_HP)) x 0.30)))
- Set Max_HP = Buff_Value[(((Player number of (Owner of (Picked unit))) x 30) + 8)]
- Game - Display to (All players) the text: (String(Max_HP))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Max_HP Greater than 0
-
Then - Actions
- Set Loop_Integer = ((Max_HP - (Max_HP mod 100)) / 100)
-
For each (Integer A) from 1 to Loop_Integer, do (Actions)
-
Loop - Actions
- Unit - Add Permanent HP to (Picked unit)
- Unit - Set level of Permanent HP for (Picked unit) to 4
- Unit - Remove Permanent HP from (Picked unit)
-
Loop - Actions
- Set Max_HP = (Max_HP / 100)
- Set Loop_Integer = ((Max_HP - (Max_HP mod 10)) / 10)
-
For each (Integer A) from 1 to Loop_Integer, do (Actions)
-
Loop - Actions
- Unit - Add Permanent HP to (Picked unit)
- Unit - Set level of Permanent HP for (Picked unit) to 3
- Unit - Remove Permanent HP from (Picked unit)
-
Loop - Actions
- Set Max_HP = (Max_HP / 10)
-
For each (Integer A) from 1 to Loop_Integer, do (Actions)
-
Loop - Actions
- Unit - Add Permanent HP to (Picked unit)
- Unit - Set level of Permanent HP for (Picked unit) to 2
- Unit - Remove Permanent HP from (Picked unit)
-
Loop - Actions
- Else - Actions
-
If - Conditions
- Countdown Timer - Start BuffTimer[(((Player number of (Owner of (Picked unit))) x 30) + 8)] as a One-shot timer that will expire in 30.00 seconds
-
Loop - Actions
-
Events
Last edited: