- Joined
- Oct 18, 2008
- Messages
- 100
I am trying to create a spell that shackles nearby units.
It creates a lightning effect between the caster & the units that are targeted.
The problem is the effects aren't destroyed.
Cast:
It creates a lightning effect between the caster & the units that are targeted.
The problem is the effects aren't destroyed.
Cast:
-
StaticShock
-
Events
- Unit - A unit Begins channeling an ability
-
Conditions
- (Ability being cast) Equal to (==) |cffadd8e6Static Shock|r
-
Actions
- Set Number_of_Units = 0
- Set Shock_Unit = (Triggering unit)
- Set Spell_Point = (Position of Shock_Unit)
- Set Spel_Group = (Units within 400.00 of Spell_Point matching (((Matching unit) belongs to an enemy of (Owner of Shock_Unit)) Equal to (==) True))
- Set Spell_Level = (Level of (Ability being cast) for Shock_Unit)
- Special Effect - Create a special effect attached to the hand,left of (Triggering unit) using war3mapImported\Storm Cast.mdx
- Set Attachment[0] = (Last created special effect)
- Special Effect - Create a special effect attached to the hand,right of (Triggering unit) using war3mapImported\Storm Cast.mdx
- Set Attachment[1] = (Last created special effect)
-
Unit Group - Pick every unit in Spel_Group and do (Actions)
-
Loop - Actions
- Set Number_of_Units = (Number_of_Units + 1)
- Set Static_Unit[Number_of_Units] = (Picked unit)
- Unit - Create 1 Lightning - Effect for (Owner of (Triggering unit)) at Spell_Point facing Default building facing (270.0) degrees
- Set Dummy = (Last created unit)
- Unit - Add a 2.00 second Generic expiration timer to Dummy
- Unit - Hide Dummy
- Unit - Set level of Slow for Dummy to Spell_Level
- Unit - Add Slow to Dummy
- Unit - Order Dummy to Human Sorceress - Slow (Picked unit)
-
Loop - Actions
- Custom script: call DestroyGroup(udg_Spel_Group)
- Custom script: call RemoveLocation(udg_Spell_Point)
- Wait 0.50 seconds
- Special Effect - Destroy Attachment[0]
- Special Effect - Destroy Attachment[1]
-
Events
-
Slow
-
Events
- Time - Every 0.10 seconds of game time
- Conditions
-
Actions
-
Do Multiple ActionsFor each (Integer Fade_Last_Index) from 1 to Number_of_Units, do (Actions)
-
Loop - Actions
- Special Effect - Destroy Shock_Effect[Fade_Last_Index]
-
Lightning - Destroy Shock[Fade_Last_Index]
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Static_Unit[Fade_Last_Index] is alive) Equal to (==) False
-
Then - Actions
- Lightning - Destroy Shock[Fade_Last_Index]
- Special Effect - Destroy Shock_Effect[Fade_Last_Index]
-
Else - Actions
- Do nothing
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Static_Unit[Fade_Last_Index] has buff Static Shock) Equal to (==) True
-
Then - Actions
- Set Shock_Point = (Position of Shock_Unit)
- Set Static_Point = (Position of Static_Unit[Fade_Last_Index])
- Lightning - Create a Chain Lightning - Secondary lightning effect from source Shock_Point to target Static_Point
- Custom script: call RemoveLocation(udg_Shock_Point)
- Custom script: call RemoveLocation(udg_Static_Point)
- Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\Bolt\BoltImpact.mdl
- Set Shock_Effect[Fade_Last_Index] = (Last created special effect)
-
Else - Actions
- Lightning - Destroy Shock[Fade_Last_Index]
- Special Effect - Destroy Shock_Effect[Fade_Last_Index]
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Do Multiple ActionsFor each (Integer Fade_Last_Index) from 1 to Number_of_Units, do (Actions)
-
Events