- Joined
- Aug 29, 2016
- Messages
- 56
Hello, so i decided to create a spell like this, this is my first time making think kind of spell.
So the problem is, i can't remove a lightning effect.I used point with polar offset to create the lightning effect, is there any other way i can remove it?
My Spell
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Soul_Shock
Actions
Wait 0.01 seconds
Set Caster = (Triggering unit)
Set Cas_Loc = (Position of Caster)
Set Damage[1] = (20.00 x (Real((Level of Soul_Shock for Caster))))
Set Damage[2] = (30.00 x (Real((Level of Soul_Shock for Caster))))
Set Damage[3] = (40.00 x (Real((Level of Soul_Shock for Caster))))
Set DmgType = Normal
Set AttkType = Spells
Set Radius[1] = 500.00
Set Radius[2] = 600.00
Set Radius[3] = 700.00
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set EffectRange[1] = (Cas_Loc offset by Radius[1] towards ((Real((Integer A))) x 40.00) degrees)
Set EffectRange[2] = (Cas_Loc offset by Radius[2] towards ((Real((Integer A))) x 40.00) degrees)
Set EffectRange[3] = (Cas_Loc offset by Radius[3] towards ((Real((Integer A))) x 40.00) degrees)
Set Soul = Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
Set Summon = Abilities\Spells\Undead\Unsummon\UnsummonTarget.mdl
Unit - Pause Caster
Special Effect - Create a special effect attached to the overhead of Caster using Summon
Set SpecialEff = (Last created special effect)
Trigger - Turn on Dmg <gen>
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Soul_Shock for Caster) Equal to 1
Then - Actions
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
Unit - Create 1 Peasant for (Owner of Caster) at (Cas_Loc offset by Radius[1] towards ((Real((Integer A))) x 40.00) degrees) facing Default building facing degrees
Set Dummy = (Last created unit)
Animation - Play Dummy's birth animation
Unit - Add a 7.60 second Generic expiration timer to Dummy
Lightning - Create a Chain Lightning - Primary lightning effect from source Cas_Loc to target (Cas_Loc offset by Radius[1] towards ((Real((Integer A))) x 40.00) degrees)
Lightning - Change color of (Last created lightning effect) to (1.00 1.00 0.00) with 1.00 alpha
Set LightEffct = (Last created lightning effect)
Else - Actions
Wait 7.00 seconds
Trigger - Turn off Dmg <gen>
Unit - Unpause Caster
Special Effect - Destroy SpecialEff
Animation - Play Dummy's death animation
Special Effect - Destroy SpecialEff
Custom script: call RemoveLocation( udg_Cas_Loc )
Lightning - Destroy LightEffct
Else - Actions
Since i don't know how to add that trigger picture thing, im gonna add this sorry for that.
So the problem is, i can't remove a lightning effect.I used point with polar offset to create the lightning effect, is there any other way i can remove it?
My Spell
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Soul_Shock
Actions
Wait 0.01 seconds
Set Caster = (Triggering unit)
Set Cas_Loc = (Position of Caster)
Set Damage[1] = (20.00 x (Real((Level of Soul_Shock for Caster))))
Set Damage[2] = (30.00 x (Real((Level of Soul_Shock for Caster))))
Set Damage[3] = (40.00 x (Real((Level of Soul_Shock for Caster))))
Set DmgType = Normal
Set AttkType = Spells
Set Radius[1] = 500.00
Set Radius[2] = 600.00
Set Radius[3] = 700.00
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set EffectRange[1] = (Cas_Loc offset by Radius[1] towards ((Real((Integer A))) x 40.00) degrees)
Set EffectRange[2] = (Cas_Loc offset by Radius[2] towards ((Real((Integer A))) x 40.00) degrees)
Set EffectRange[3] = (Cas_Loc offset by Radius[3] towards ((Real((Integer A))) x 40.00) degrees)
Set Soul = Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
Set Summon = Abilities\Spells\Undead\Unsummon\UnsummonTarget.mdl
Unit - Pause Caster
Special Effect - Create a special effect attached to the overhead of Caster using Summon
Set SpecialEff = (Last created special effect)
Trigger - Turn on Dmg <gen>
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Soul_Shock for Caster) Equal to 1
Then - Actions
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
Unit - Create 1 Peasant for (Owner of Caster) at (Cas_Loc offset by Radius[1] towards ((Real((Integer A))) x 40.00) degrees) facing Default building facing degrees
Set Dummy = (Last created unit)
Animation - Play Dummy's birth animation
Unit - Add a 7.60 second Generic expiration timer to Dummy
Lightning - Create a Chain Lightning - Primary lightning effect from source Cas_Loc to target (Cas_Loc offset by Radius[1] towards ((Real((Integer A))) x 40.00) degrees)
Lightning - Change color of (Last created lightning effect) to (1.00 1.00 0.00) with 1.00 alpha
Set LightEffct = (Last created lightning effect)
Else - Actions
Wait 7.00 seconds
Trigger - Turn off Dmg <gen>
Unit - Unpause Caster
Special Effect - Destroy SpecialEff
Animation - Play Dummy's death animation
Special Effect - Destroy SpecialEff
Custom script: call RemoveLocation( udg_Cas_Loc )
Lightning - Destroy LightEffct
Else - Actions
Since i don't know how to add that trigger picture thing, im gonna add this sorry for that.