• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

[Solved] Hero´s stats influence the cooldown

Level 12
Joined
Oct 28, 2019
Messages
480
  • QSwordAttack
    • Events
      • Unit - A unit owned by Player 2 (Blue) Starts the effect of an ability
    • Conditions
      • (Casting unit) Equal to HeroVariable
      • (Ability being cast) Equal to Berserk (Q)
      • BoleanTarget Equal to True
    • Actions
      • Unit - For Unit HeroVariable, start cooldown of ability (Ability being cast) " over "10.00 seconds.
      • Unit - Order HeroVariable to Neutral Sea Witch - Forked Lightning UnitTarget
Im using a dummy spell berserk to use as attack, but the cooldown should be interfered by stats like agility and itens,

I´ve put 10 seconds real number but even the cooldown of 10 sec dont work, need help
 
Level 12
Joined
Oct 28, 2019
Messages
480
SOLVED
  • QSwordAttack
    • Events
      • Unit - A unit owned by Player 2 (Blue) Finishes casting an ability
    • Conditions
      • (Casting unit) Equal to HeroVariable
      • (Ability being cast) Equal to Berserk (Q)
      • BoleanTarget Equal to True
    • Actions
      • Unit - For Unit HeroVariable, start cooldown of ability (Ability being cast) " over "(3.00 - (0.20 x (Real((Agility of HeroVariable (Include bonuses)))))) seconds.
      • Unit - Order HeroVariable to Neutral Sea Witch - Forked Lightning UnitTarget
I´ve just change to finishes casting an ability
 

Remixer

Map Reviewer
Level 31
Joined
Feb 19, 2011
Messages
1,957
Finishes casting works in this case, but is usually bad practice as it can lead to issues. In order to start a cooldown, the spell must not be on cooldown (Cooldown does not start when unit Finishes casting, but before Spell Effect, so that's why it works in this case). If you want to start a cooldown, just simply reset the ability's cooldown first using the reset native.
 
Top