Lightning Slash

troylowyee

Active Member
Reaction score
0
I am making a hero,but there is this skill where he slashes a target unit 10 time dealing 250 damage,i made that but i do not know why there is no cooldown.
Lightning Slash
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Lightning Slash
Actions
Set LS_Caster = (Triggering unit)
Set LS_CasterLoc = (Position of LS_Caster)
Set LS_Target = (Target unit of ability being cast)
Set LS_TargetLoc = (Position of LS_Target)
Special Effect - Create a special effect attached to the weapon of (Triggering unit) using Abilities\Spells\Orc\LightningBolt\LightningBoltMissile.mdl
Set LightningSlashSE = (Last created special effect)
Unit - Make LS_Caster Invulnerable
Animation - Change LS_Caster's vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
Selection - Remove LS_Caster from selection
Unit - Move LS_Caster instantly to (Position of LS_Target)
Custom script: call RemoveLocation(udg_LS_CasterLoc)
Wait 0.04 seconds
Sound - Play MetalLightSliceFlesh2 <gen>
Animation - Play LS_Caster's attack animation
Unit - Cause LS_Caster to damage LS_Target, dealing (250.00 x (Real((Level of Lightning Slash for LS_Caster)))) damage of attack type Spells and damage type Normal
Wait 0.04 seconds
Sound - Play MetalLightSliceFlesh2 <gen>
Animation - Play LS_Caster's attack animation
Unit - Cause LS_Caster to damage LS_Target, dealing (250.00 x (Real((Level of Lightning Slash for LS_Caster)))) damage of attack type Spells and damage type Normal
Wait 0.04 seconds
Sound - Play MetalLightSliceFlesh2 <gen>
Animation - Play LS_Caster's attack animation
Unit - Cause LS_Caster to damage LS_Target, dealing (250.00 x (Real((Level of Lightning Slash for LS_Caster)))) damage of attack type Spells and damage type Normal
Wait 0.04 seconds
Sound - Play MetalLightSliceFlesh2 <gen>
Animation - Play LS_Caster's attack animation
Unit - Cause LS_Caster to damage LS_Target, dealing (250.00 x (Real((Level of Lightning Slash for LS_Caster)))) damage of attack type Spells and damage type Normal
Wait 0.04 seconds
Sound - Play MetalLightSliceFlesh2 <gen>
Animation - Play LS_Caster's attack animation
Unit - Cause LS_Caster to damage LS_Target, dealing (250.00 x (Real((Level of Lightning Slash for LS_Caster)))) damage of attack type Spells and damage type Normal
Wait 0.04 seconds
Sound - Play MetalLightSliceFlesh2 <gen>
Animation - Play LS_Caster's attack animation
Unit - Cause LS_Caster to damage LS_Target, dealing (250.00 x (Real((Level of Lightning Slash for LS_Caster)))) damage of attack type Spells and damage type Normal
Wait 0.04 seconds
Sound - Play MetalLightSliceFlesh2 <gen>
Animation - Play LS_Caster's attack animation
Unit - Cause LS_Caster to damage LS_Target, dealing (250.00 x (Real((Level of Lightning Slash for LS_Caster)))) damage of attack type Spells and damage type Normal
Wait 0.04 seconds
Sound - Play MetalLightSliceFlesh2 <gen>
Animation - Play LS_Caster's attack animation
Unit - Cause LS_Caster to damage LS_Target, dealing (250.00 x (Real((Level of Lightning Slash for LS_Caster)))) damage of attack type Spells and damage type Normal
Wait 0.04 seconds
Sound - Play MetalLightSliceFlesh2 <gen>
Animation - Play LS_Caster's attack animation
Unit - Cause LS_Caster to damage LS_Target, dealing (250.00 x (Real((Level of Lightning Slash for LS_Caster)))) damage of attack type Spells and damage type Normal
Wait 0.04 seconds
Sound - Play MetalLightSliceFlesh2 <gen>
Animation - Play LS_Caster's attack animation
Unit - Cause LS_Caster to damage LS_Target, dealing (250.00 x (Real((Level of Lightning Slash for LS_Caster)))) damage of attack type Spells and damage type Normal
Animation - Change (Triggering unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Unit - Make (Triggering unit) Vulnerable
Selection - Add (Triggering unit) to selection for Player 1 (Red)
Special Effect - Destroy LightningSlashSE
 

Sirroelivan

Gunnerkrigg Court
Reaction score
95
What do you mean with cooldown, if you want the ability to have cooldown, you just have to modify your lightning slash ability. If you want the different "slashes" to be clearly visible, use a longer wait between them, 0.04 sec is almost not visible.
 

XeNiM666

I lurk for pizza
Reaction score
138
also in addition to Sirroelivan's reply, use a loop instead of having waits
 

dannyboydude

Ultra Cool Member
Reaction score
33
can i ask how do you make spells last longer by using loops?

i dont even think a loop waits? does it?

and ive heard about not putting waits in a loop why?
 

vypur85

Hibernate
Reaction score
803
Try adding the little wait there.
Code:
Events
 Unit - A unit Starts the effect of an ability
Conditions
 (Ability being cast) Equal to Lightning Slash
Actions
 Set LS_Caster = (Triggering unit)
 Set LS_CasterLoc = (Position of LS_Caster)
 Set LS_Target = (Target unit of ability being cast)
 [B]Wait 0.00 seconds[/B] <-- [I]Add this[/I]
 Set LS_TargetLoc = (Position of LS_Target)
 Special Effect - Create a special effect attached to the weapon of (Triggering unit) using Abilities\Spells\Orc\LightningBolt\LightningBoltMissile.mdl
 Set LightningSlashSE = (Last created special effect)
 ----etc etc----
The cooldown was affected because you moved the unit instantly. Else, try using another ability instead of the ability you're basing off now (Don't use Chain Lightning?).

Waits work in integer loops but not Unit Group or Player Group.
 

troylowyee

Active Member
Reaction score
0
try adding the little wait there.
Code:
events
 unit - a unit starts the effect of an ability
conditions
 (ability being cast) equal to lightning slash
actions
 set ls_caster = (triggering unit)
 set ls_casterloc = (position of ls_caster)
 set ls_target = (target unit of ability being cast)
 [b]wait 0.00 seconds[/b] <-- [i]add this[/i]
 set ls_targetloc = (position of ls_target)
 special effect - create a special effect attached to the weapon of (triggering unit) using abilities\spells\orc\lightningbolt\lightningboltmissile.mdl
 set lightningslashse = (last created special effect)
 ----etc etc----
the cooldown was affected because you moved the unit instantly. Else, try using another ability instead of the ability you're basing off now (don't use chain lightning?).

Waits work in integer loops but not unit group or player group.

it worked!!! Thanks dude!!!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top