- Joined
- Aug 5, 2010
- Messages
- 147
Im making an ability that has a chance to deal AOE damage to units around the attacking unit.
Here is the trigger, Reactive_Damage is defined in another trigger.
How do i make it so a Cluster Rocket will be launched towards units further than 300 range away and deal Aoe damage to the unit and units around it when the rocket hits.
Here is the trigger, Reactive_Damage is defined in another trigger.
-
Reactive Attack
-
Events
-
Game - DamageEvent becomes Equal to 1.00
-
-
Conditions
-
(Unit-type of DamageEventTarget) Equal to Marine [Agi]
-
-
Actions
-
Set Reactive_Attacker = DamageEventSource
-
Set Reactive_Hero = DamageEventTarget
-
Set Reactive_Point = (Position of Reactive_Attacker)
-
Set Reactive_Group = (Units within 200.00 of Reactive_Point matching (((Matching unit) belongs to an enemy of (Owner of Reactive_Hero)) Equal to True))
-
Set Reactive_Chance = (Random integer number between 1 and 100)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Reactive_Hero has buff Reactive Armor ) Equal to True
-
Reactive_Chance Less than or equal to 20
-
-
Then - Actions
-
Unit Group - Pick every unit in Reactive_Group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between (Position of Reactive_Hero) and (Position of Reactive_Attacker)) Less than or equal to 300.00
-
((Picked unit) is A structure) Equal to False
-
((Picked unit) is Magic Immune) Equal to False
-
((Picked unit) is alive) Equal to True
-
-
Then - Actions
-
Special Effect - Create a special effect at Reactive_Point using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
-
Special Effect - Destroy (Last created special effect)
-
Unit - Cause Reactive_Hero to damage (Picked unit), dealing Reactive_Damage[(Level of Reactive Armor for Reactive_Hero)] damage of attack type Spells and damage type Normal
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
-
Custom script: call DestroyGroup(udg_Reactive_Group)
-
Custom script: call RemoveLocation(udg_Reactive_Point)
-
-