Code:
MA Settings
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to (==) Mystical Axe
Actions
Set MA_Caster = (Triggering unit)
Set MA_CasterOwner = (Owner of MA_Caster)
Set MA_CasterPosition = (Position of MA_Caster)
Set MA_Target = (Target unit of ability being cast)
Set MA_Damage = (50.00 + (50.00 x (Real((Level of Mystical Axe for MA_Caster)))))
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of MA_Target) Less than or equal to (<=) MA_Damage
Then - Actions
Unit - Kill MA_Target
Set MA_TargetPosition = (Position of MA_Target)
Unit - Create 1 Dummy Unit for MA_CasterOwner at MA_TargetPosition facing 0.00 degrees
Set MA_Dummy = (Last created unit)
Unit - Add Mystical Axe to MA_Dummy
Unit - Set level of Mystical Axe for MA_Dummy to (Level of Mystical Axe for MA_Caster)
Unit Group - Pick every unit in (Units within 700.00 of MA_TargetPosition matching ((((Picked unit) belongs to an enemy of MA_CasterOwner) Equal to (==) True) and (((Picked unit) is alive) Equal to (==) True))) and do (Actions)
Loop - Actions
Unit Group - Add (Picked unit) to MA_PossibleTargets
Unit - Order MA_Dummy to Human Mountain King - Storm Bolt (Random unit from MA_PossibleTargets)
Unit - Remove MA_Dummy from the game
Else - Actions
Do nothing
Here the code.
I cast the spell ok.
But the if actions won't work =X
Whats wrong?
I am so frustated =X
Can't find anythign wrong T.T