Moderator
M
Moderator
00:28, 17th Jun 2010
Hanky:
Looks okay now. Approved!
Hanky:
Looks okay now. Approved!
[IMG]https://www.hiveworkshop.com/forums/pastebin_data/z63k1z/Assassins%20Aid%20Button.jpg[/IMG]Each time a nearby enemy unit dies, the Assasin uses it's corpse to heal every nearby allied unit. The health is split depended on how many allied units nearby.
Level 1 - 5% of max health is split.
Level 2 - 8% of max health is split.
Level 3 - 11% of max health is split
Level 4 - 14% of max health is split.
Area of Effect: 700
AA Preload

Events


Map initialization

Conditions

Actions


For each (Integer A) from 1 to 4, do (Actions)



Loop - Actions




Set AA_Percent[(Integer A)] = (5.00 + (3.00 x (Real((Integer A)))))
AA Effect

Events


Unit - A unit Dies

Conditions

Actions


Set AA_Loc[1] = (Position of (Triggering unit))


Set AA_Cstr_Group = (Units within 700.00 of AA_Loc[1] matching (((Level of Assassins Aid for (Matching unit)) Greater than 0) and (((Matching unit) is alive) Equal to True)))


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



Loop - Actions




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





If - Conditions






(AA_Cstr_Group is empty) Equal to False





Then - Actions






Set AA_E_HP = (Max life of (Triggering unit))






Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl






Special Effect - Destroy (Last created special effect)






Set AA_Loc[2] = (Position of (Picked unit))






Set AA_A_Group = (Units within 700.00 of AA_Loc[2] matching ((((Matching unit) belongs to an ally of (Owner of (Picked unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))






Set AA_HPcount = ((AA_E_HP / AA_Percent[(Level of Assassins Aid for (Picked unit))]) / (Real((Number of units in AA_A_Group))))






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







Loop - Actions








Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + AA_HPcount)








Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl








Special Effect - Destroy (Last created special effect)






Custom script: call RemoveLocation (udg_AA_Loc[2])






Custom script: call DestroyGroup (udg_AA_A_Group)





Else - Actions


Custom script: call RemoveLocation (udg_AA_Loc[1])


Custom script: call DestroyGroup (udg_AA_Cstr_Group)