Spell Cooldown Not Working + Broken Shadow Strike Spell

SkinnyAshley

New Member
Reaction score
2
Hi Everyone,
I have two custom spells in a map I'm making. One is called "Critical Assault", and I'm not gonna beat around the bush, it's pretty much "Omnislash". In fact, I even used this tutorial http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=38947 to make it. Anyway, the spell works fine, except it doesn't appear to have a cooldown in game; it can be used straight away after it's finished. There are definately cooldowns set in the Ability Editor, so I don't know what the problem is there.
The other spell is a "Shadow Strike" ability (initial damage, then damage over time). The initial damage is set to 80, decay power of 1 and decay damage of 5, and a duration of 5 seconds (so 80 initial damage, followed by 5 damage per 1 second for 5 seconds). However, when this ability is used in game, it instantly kills most units, and killed a 50,000HP unit in less than half a second. Once again, I don't know why this is happening.
Sorry if I waffled on a bit there, I just wanted to make it clear for anyone who wanted to help.
Thanks everyone.
-- SkinnyAshley
 

yunusowic

New Member
Reaction score
7
Im guessing that you are pausing the unit when it casts the spell. When its paused it will cancel casting but the trigger will still run. Thats why the cooldown doesnt work. Put a Wait - 0.01 seconds action on top of your actions, it should fix the problem.

I have had the same problem with Shadow Strike ability. When i change any data it instatly kills. Try using Acid Bomb.
 

SkinnyAshley

New Member
Reaction score
2
There is no pause in the trigger:
Code:
Critical Assault
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Critical Assault 
    Actions
        Set schemical = (Triggering unit)
        Set victim = (Target unit of ability being cast)
        Set victimposition = (Position of (Target unit of ability being cast))
        If ((Level of Critical Assault  for schemical) Equal to 1) then do (Set blinks = 2) else do (Do nothing)
        If ((Level of Critical Assault  for schemical) Equal to 2) then do (Set blinks = 5) else do (Do nothing)
        If ((Level of Critical Assault  for schemical) Equal to 3) then do (Set blinks = 8) else do (Do nothing)
        Unit - Make schemical Invulnerable
        Animation - Change schemical's vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
        Selection - Remove schemical from selection
        Unit - Move schemical instantly to victimposition
        Custom script:   call RemoveLocation(udg_victimposition)
        Animation - Play schemical's attack animation
        Unit - Cause schemical to damage victim, dealing (Random real number between 150.00 and 250.00) damage of attack type Hero and damage type Normal
        Special Effect - Create a special effect attached to the chest of schemical using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
        Special Effect - Destroy (Last created special effect)
        For each (Integer A) from 1 to blinks, do (Actions)
            Loop - Actions
                Wait 0.30 game-time seconds
                Set schemicalposition = (Position of schemical)
                Set EG[1] = (Units within 600.00 of schemicalposition matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of schemical)) Equal to True) and ((((Matching unit) 
                Set EG[2] = (Random 1 units from EG[1])
                Custom script:   call RemoveLocation(udg_schemicalposition)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in EG[1]) Greater than 0
                    Then - Actions
                        Unit Group - Pick every unit in EG[2] and do (Actions)
                            Loop - Actions
                                Set p = (Picked unit)
                                Set pl = (Position of p)
                                Selection - Remove schemical from selection
                                Unit - Move schemical instantly to pl
                                Custom script:   call RemoveLocation(udg_pl)
                                Animation - Play schemical's attack animation
                                Unit - Cause schemical to damage p, dealing (Random real number between 150.00 and 250.00) damage of attack type Hero and damage type Normal
                                Special Effect - Create a special effect attached to the chest of schemical using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
                                Special Effect - Destroy (Last created special effect)
                                Custom script:   call DestroyGroup(udg_EG[1])
                                Custom script:   call DestroyGroup(udg_EG[2]) 
                    Else - Actions
                        Custom script:   call DestroyGroup(udg_EG[1])
                        Custom script:   call DestroyGroup(udg_EG[2]) 
                        Selection - Add schemical to selection for (Owner of schemical)
                        Animation - Change schemical's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                        Unit - Make schemical Vulnerable
        Selection - Add schemical to selection for (Owner of schemical)
        Animation - Change schemical's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
        Unit - Make schemical Vulnerable

There is a "Wait" command though.

Thanks for the suggestion with the "Shadow Strike", I'll use "Acid Bomb" instead. I wonder why it doesn't work...
Anyway, thanks for the help.
-- SkinnyAshley
 

yunusowic

New Member
Reaction score
7
I think the move action also interrupts spellcasting. Put a "Wait 0.01 game-times seconds" action above "Unit - Move schemical instantly to victimposition".
 

simonake

New Member
Reaction score
72
I already had this problem.

Simply had wait 0.5 seconds before all the actions.

you wont see it and cooldown will appear
 

SkinnyAshley

New Member
Reaction score
2
Thanks guys. I put the "Wait" command where you said to, yunusowic, and the spell worked fine, so thanks very much.
-- SkinnyAshley
 
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