LordSaddler1
New Member
- Reaction score
- 4
Just as the title says. Here it is
Code:
Berserk Frenzy
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Berserk Frenzy
Actions
Set Berserker_Frenzy_Killer = (Target unit of ability being cast)
Set Berserk_Frenzy_Killer_Loc[1] = (Position of Berserker_Frenzy_Killer)
Set BerserkFarDistance[1] = 10000
Unit Group - Pick every unit in (Units within 1000.00 of Berserk_Frenzy_Killer_Loc[1]) and do (Actions)
Loop - Actions
Set Berserk_Frenzy_Killer_Loc[2] = (Position of (Picked unit))
Set BerserkFarDistance[2] = (Integer((Distance between Berserk_Frenzy_Killer_Loc[1] and Berserk_Frenzy_Killer_Loc[2])))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BerserkFarDistance[2] Less than BerserkFarDistance[1]
Then - Actions
Set BerserkFarDistance[1] = BerserkFarDistance[2]
Set Berserk_Frenzy_Target = (Picked unit)
Else - Actions
Do nothing
Unit - Order Berserker_Frenzy_Killer to Attack Berserk_Frenzy_Target
Trigger - Turn on Berserk Frenzy Attack <gen>
Wait 8.00 seconds
Trigger - Turn off Berserk Frenzy Attack <gen>
Code:
Berserk Frenzy Attack
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit - Order Berserker_Frenzy_Killer to Attack Berserk_Frenzy_Target