• 🏆 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!

Issue with cooldown for triggered spell

Status
Not open for further replies.
Level 8
Joined
Jul 17, 2004
Messages
283
I triggered a custom spell based on the Channel ability. My spell involves pausing the caster, waiting, and then unpausing him. After the caster is unpaused, the cooldown is already in motion. How can I fix this so the cooldown doesn't start until after the caster is unpaused?
 
Level 8
Joined
Jul 17, 2004
Messages
283
  • Earth Bolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Earth Bolt
    • Actions
      • Set Caster = (Triggering unit)
      • Set Target = (Target unit of ability being cast)
      • Unit - Pause Caster
      • Unit - Add Invulnerable (Neutral) to Caster
      • Custom script: call SetUnitAnimationByIndex(udg_Caster, 4)
      • Special Effect - Create a special effect at (Position of Caster) using Abilities\Spells\Other\Drain\DrainCaster.mdl
      • Set SFX = (Last created special effect)
      • Wait 3.00 seconds
      • Special Effect - Create a special effect attached to the origin of Target using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
      • Unit - Cause Caster to damage Target, dealing 100.00 damage of attack type Spells and damage type Normal
      • Special Effect - Destroy SFX
      • Unit - Remove Invulnerable (Neutral) from Caster
      • Unit - Unpause Caster
I am aware that the trigger leaks and is inefficient. I'll be fixing it up later. But I think the cooldown issue lies within the Object Editor. Not too sure though.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I cannot see why you would require it to make it work and suggest you to just increase the ability cooldown by 3.

If you really want to have it, you can try pausing the unit when he starts channeling and set the casting/channeling time to 3 seconds. I don't know if he will stop the ability though, but it is worth a try.
 
Status
Not open for further replies.
Top