• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Why is my channeling custom ability cooldown not working??

Status
Not open for further replies.
Level 5
Joined
Jun 13, 2012
Messages
113
So i made a custom ability based off channel and i put the cool down to 25 guess what it total ignores it and instead has 0 cool down in game.
I re looked in my triggers and i don't have a trigger that says reset cool down or anything like that. does the cool down have to be triggered too? help plzz
 
Level 13
Joined
Jun 3, 2011
Messages
1,058
Ow Yeah Channels Dosen't do anything Except for You add a Buff/ability that Give the player Additional Stats
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
the problem is your trigger moves the unit instantly before the unit was able to cast the ability, therefore it will stop the ability.. because it stops the ability, they won't go into cooldown...

here, i cleaned your triggers.. feel free to ask if you have any questions...
i used a hashtable, if you had already have a hashtable on your map, use that hashtable instead.. And this is a tutorial about memory leaks Things That Leak. In your case, you're leaking points (Position of Caster, Position of Target)

and this won't work..
  • Animation - Play Caster's attack slam animation
because there is no animation name like that (only attack, stand, spell, slam, etc i guess)...
so i used this custom script.
  • Custom script: call SetUnitAnimationByIndex(GetTriggerUnit(), 5)
GetTriggerUnit() goes to (Triggering unit), and 5 is the animation indices... i found 5 as the best animation it could get (you can change it to 1 or 2 or 3 or any number which fits the animation best)...

  • Hashtable
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set hash = (Last created hashtable)
  • Begin Casting
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Flash
    • Actions
      • Set tempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Triggering player) at tempPoint facing Default building facing degrees
      • Unit Group - Add (Last created unit) to flashGroup
      • Set HandleId = (Key (Last created unit))
      • Set Target = (Target unit of ability being cast)
      • Unit - Create 1 Flash Dummy for (Triggering player) at tempPoint facing Default building facing degrees
      • Unit - Move (Last created unit) instantly to tempPoint
      • Unit - Add a 0.30 second Generic expiration timer to (Last created unit)
      • Hashtable - Save Handle OfTarget as 0 of HandleId in hash
      • Custom script: call RemoveLocation(udg_tempPoint)
  • Finishes Casting
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Flash
    • Actions
      • Unit Group - Pick every unit in flashGroup and do (Actions)
        • Loop - Actions
          • Set HandleId = (Key (Picked unit))
          • Set Target = (Load 0 of HandleId in hash)
          • Set tempPoint = (Position of Target)
          • Set tempPoint2 = (Position of (Triggering unit))
          • Unit - Create 1 Flash Dummy for (Triggering player) at tempPoint facing Default building facing degrees
          • Unit - Add a 0.30 second Generic expiration timer to (Last created unit)
          • Unit - Move (Last created unit) instantly to tempPoint
          • Unit - Move (Triggering unit) instantly to tempPoint
          • Unit - Make (Triggering unit) face Target over 0.00 seconds
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Target belongs to an enemy of (Triggering player)) Equal to True
            • Then - Actions
              • Custom script: call SetUnitAnimationByIndex(GetTriggerUnit(), 5)
              • Unit - Cause (Triggering unit) to damage Target, dealing ((25.00 x (Real((Level of Flash for (Triggering unit))))) + 25.00) damage of attack type Spells and damage type Normal
              • Unit - Create 1 Dummy for (Triggering player) at tempPoint facing Default building facing degrees
              • Unit - Add Purge to (Last created unit)
              • Unit - Order (Last created unit) to Orc Shaman - Purge Target
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
            • Else - Actions
          • Unit - Add a 0.10 second Generic expiration timer to (Picked unit)
          • Hashtable - Clear all child hashtables of child HandleId in hash
          • Custom script: call RemoveLocation(udg_tempPoint)
          • Custom script: call RemoveLocation(udg_tempPoint2)
 

Attachments

  • Show.w3x
    19.5 KB · Views: 26
Status
Not open for further replies.
Top