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
 
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.
 
also in addition to Sirroelivan's reply, use a loop instead of having waits
 
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?
 
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.
 
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.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      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