- Joined
- Aug 8, 2010
- Messages
- 1,022
Hi! I wanna ask you guys how i can make a MUI trigger with a specific unit event or other event, but with the fuction "...Takes Damage" there is my spell (it works! And i can't believe that
)
-
Init
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Hashtable - Create a hashtable
-


Set HashTblIceBarr = (Last created hashtable)
-
-
-
Trig1
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Ice Barrier
-
-

Actions
-


Unit Group - Add (Triggering unit) to IceBarrUnGroup
-


Hashtable - Save 1500.00 as 1 of (Key (Triggering unit)) in HashTblIceBarr
-


Hashtable - Save Handle Of(Casting unit) as 2 of (Key (Triggering unit)) in HashTblIceBarr
-


Trigger - Turn on Trig2 <gen>
-


Game - Display to (All players) the text: Trig started!
-
-
-
Trig2
-

Events
-


Unit - Lich 0000 <gen> Takes damage
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in IceBarrUnGroup and do (Actions)
-



Loop - Actions
-




Hashtable - Save ((Load 1 of (Key (Attacked unit)) from HashTblIceBarr) - (Damage taken)) as 1 of (Key (Attacked unit)) in HashTblIceBarr
-




Unit - Set life of (Load 2 of (Key (Attacked unit)) in HashTblIceBarr) to ((Life of (Load 2 of (Key (Attacked unit)) in HashTblIceBarr)) + (Damage taken))
-




Trigger - Run Trig3 <gen> (checking conditions)
-




Game - Display to (All players) the text: Trig runs
-
-
-


Unit - Set life of (Load 2 of (Key (Attacked unit)) in HashTblIceBarr) to ((Life of (Load 2 of (Key (Attacked unit)) in HashTblIceBarr)) + (Damage taken))
-
-
-
Trig3
-

Events
-


Unit - Lich 0000 <gen> Takes damage
-
-

Conditions
-

Actions
-


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



If - Conditions
-




(Load 1 of (Key (Attacked unit)) from HashTblIceBarr) Greater than 0.00
-
-



Then - Actions
-




Do nothing
-
-



Else - Actions
-




Game - Display to (All players) the text: Trig stopped
-




Unit - Remove Frost Armor buff from (Load 2 of (Key (Attacked unit)) in HashTblIceBarr)
-




Trigger - Turn off Trig2 <gen>
-
-
-
-







