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

[Trigger] Detecting attack cooldown?

Status
Not open for further replies.
Level 5
Joined
Feb 1, 2009
Messages
107
Is it possible to detect the current attack cooldown of an unit using triggers? There are some unit properties that can be found in the trigger editor, such as life, mana, and even movement speed, but I can't find attack cooldown.

I want to detect this because I want to do a trigger that makes my unit damage the other unit when it is issued the attack order. But then the damage will apply before the hitting animation, so it gets kinda ugly. If I could detect the attack cooldown, I could make something like "Set AtkCdwn = Current Attack Cooldown of Unit", and then do "Wait (AtkCdwn) seconds" before my trigger applies the damage, and it would look like the damage was applied exactly when the hitting animation finished.
 
Level 6
Joined
Sep 5, 2007
Messages
264
As Marcelo said, use a damage detection system.

With a damage detection system, you can do a lot of things, like custom criticals, custom misses, double damage if the unit has a certain buff, etc.
All these without the engine interfering (like a red number popping up above the target when your guy critical hits, or the red "miss" if it misses).
You can also do "cool" things like add extra damage based on a certain stat (like 0.5% of hero's strength/agility/intelligence as bonus damage per attack).
 
Status
Not open for further replies.
Top