- Joined
- Dec 6, 2008
- Messages
- 374
Hi, I can't figure out where is the problem. I want to this trigger to cast lighting bold after short delay and damage all units in AOE. But it damages (kills) only one unit in the AOE.
-
LightingImpact
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Lighting Impact (SORC)
-
-
Actions
-
Set VariableSet Integer = (Player number of (Owner of (Triggering unit)))
-
Set VariableSet LightingImpactDelay[Integer] = 0.75
-
Set VariableSet LightingImpactIsActive[Integer] = True
-
Set VariableSet LightingImpactLocation[Integer] = (Target point of ability being cast)
-
Set VariableSet LightingImpactCaster[Integer] = (Triggering unit)
-
Set VariableSet Point = (Target point of ability being cast)
-
Special Effect - Create a special effect at Point using Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_Point)
-
Trigger - Turn on LightingImpactEffect <gen>
-
-
-
LightingImpactEffect
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Set VariableSet Integer = 0
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
LightingImpactIsActive[(Integer A)] Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
LightingImpactDelay[(Integer A)] Greater than 0.00
-
-
Then - Actions
-
Set VariableSet LightingImpactDelay[(Integer A)] = (LightingImpactDelay[(Integer A)] - 0.03)
-
-
Else - Actions
-
Set VariableSet Point = LightingImpactLocation[(Integer A)]
-
Unit - Create 1 Lighting for (Owner of LightingImpactCaster[(Integer A)]) at Point facing Default building facing degrees
-
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
-
Sound - Play LightningBolt <gen> at 100.00% volume, located at Point with Z offset 0.00
-
Set VariableSet Group = (Units within 280.00 of Point matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of LightingImpactCaster[(Integer A)]).) Equal to True) and (((Matching unit) is A ground unit) Equal to True))).)
-
Custom script: call RemoveLocation(udg_Point)
-
Unit Group - Pick every unit in Group and do (Actions)
-
Loop - Actions
-
Unit - Cause LightingImpactCaster[(Integer A)] to damage (Picked unit), dealing 500.00 damage of attack type Magic and damage type Normal
-
-
-
Custom script: call DestroyGroup(udg_Group)
-
Set VariableSet LightingImpactIsActive[(Integer A)] = False
-
-
-
-
Else - Actions
-
Set VariableSet Integer = (Integer + 1)
-
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Integer Equal to 6
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-