• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Ability cooldown doesn't proc when cast on self

Status
Not open for further replies.
Level 4
Joined
Jan 20, 2022
Messages
26
I have a custom ability, which worked previously. I don't know how I've broken it.

The ability applies a modified windwalk on target. When cast on friendly units, it works as intended. The Hero's ability goes on cooldown and the receiving unit gets the speed boost. HOWEVER, when I cast it on my own hero, they receive the speed boost and buff, but the ability does not go on cooldown. Casting the ability again triggers the cooldown, but no effects are applied.

Can anyone figure out why this is the case? I am so confused by it.

I've attached the Dummy Ability from the OBject Editor and the relevant trigger. There's also the actual ability (Modified Winwalk) but I am guessing you don't need it - tell me if I'm wrong :)

Any help much appreciated!
 

Attachments

  • Ability1.PNG
    Ability1.PNG
    61.9 KB · Views: 10
  • Ability2.PNG
    Ability2.PNG
    60.2 KB · Views: 6
  • Ability3.PNG
    Ability3.PNG
    54.5 KB · Views: 10
  • Trigger.PNG
    Trigger.PNG
    54.3 KB · Views: 17
Change Follow Through Time in the Channel-based spell to 0.00 instead of 0.01 and perhaps change the trigger event to "unit finishes casting an ability"
Ordering the caster unit to follow a different order from a "unit starts the effect of an ability" may be dodgy sometimes because the triggered order can cancel the current order to cast the base spell. If you still want to use "unit starts the effect of an ability" event you need a timer before issuing a different order.
 
Level 4
Joined
Jan 20, 2022
Messages
26
Change Follow Through Time in the Channel-based spell to 0.00 instead of 0.01 and perhaps change the trigger event to "unit finishes casting an ability"
Ordering the caster unit to follow a different order from a "unit starts the effect of an ability" may be dodgy sometimes because the triggered order can cancel the current order to cast the base spell. If you still want to use "unit starts the effect of an ability" event you need a timer before issuing a different order.
Oh, that actually makes a lot of sense. The trigger forces the target to cast a new ability, which may cancel the current ability if the cast animation isn't done or something.

I feel like I read somewhere that the Follow Through Time should never be 0.00 for some specific reason. Do you know why I might have read this?

Will try the solution later today when I have time. Thanks :)
 
Level 23
Joined
Oct 18, 2008
Messages
937
in some cases object editor treats 0 as infinite or crashes the game or something. this is probably one of those cases.

any ability that interrupts the unit at "starts the effect of an ability" will break the cooldown as you've experienced. you could use a 0 second timer to make a still-instant effect that (if I remember right) doesn't break the spell's normal behavior. if you want a wind walk effect without interrupting the unit, you could drop it as a rune.

you could also just start the cooldown with the new action that does that but I'm not sure that fully addresses the problem. I haven't really explored the "interrupts when starting the effect" behavior.

by the way you can just paste images from your clipboard right into the post with control-v for less effort and better result.
 
Level 4
Joined
Jan 20, 2022
Messages
26
Thanks for the responses everyone. Some clarification and comments:

  • The ability has previously worked. I can't remember if/what I changed, but I do know that it worked with "unit starts the effect of an ability" and the follow-through time of 0.01. I DID try changing both of these, but the first breaks the trigger (loses triggering unit when it's after) and 0.00 on follow-throw had no effect.
  • I tried adding the ability to another hero and the problem persists.
  • I tried removing the actual ability (Wind Walk custom ability) from the script, and the CD works on the Dummy ability.
  • Thanks for the hint about pasting from clipboard :)

I'm still trying to figure this out. Let me know if I've missed something.

I ended up capitulating and setting the Allowed Targets to only Friendly. So now the ability can't be cast on self, and I will have no further issues :p
 
Last edited:
Status
Not open for further replies.
Top