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

Kill enemy wait wind walk and reset the cooldown

Status
Not open for further replies.
Level 6
Joined
Mar 28, 2018
Messages
128
Why don t work?

upload_2018-7-3_22-28-47.png
 

Attachments

  • upload_2018-7-3_22-28-39.png
    upload_2018-7-3_22-28-39.png
    165.8 KB · Views: 26
Level 4
Joined
Jul 2, 2014
Messages
46
Whenever the windwalk'd unit kills the unit, it longer has the Windwalk buff (since it goes away upon attacking and not dealing the damage, tho, not killing the target); your trigger will never work this way.

Plus, you should use (Killing Unit) and not (Attacking Unit) in your trigger.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
I do not think using attacking event is a clean solution, partially since that event is bugged.

I think using the unit dies event is the best, seems like you'd have to track if wind walk is active for a unit though.
I reckon you'd need a trigger or two to track when a unit is casting it and then when an attack is made to figure out when the buff is used.

Either way, a DDS should be helpful here.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
I do not think using attacking event is a clean solution, partially since that event is bugged.
In what way is it bugged? This is the first I have heard of that...

The solution might be to use a damage detection system. Hopefully (not sure) the unit still has the wind walk buff when it deals damage to another unit. If this damage is fatal (reduces current life below 0.405) then proc your cooldown reset on the damage source.
 
Level 13
Joined
Oct 12, 2016
Messages
769
Alright, hang on. You're wanting Wind Walk (WW) to reset its cooldown when you kill a unit with WW, right?
Let's think about this logically.

If you attack a unit with WW and it doesn't die, then no cooldown reset.
If you kill the unit with WW, then you want it to reset.
OK. If you kill the unit without WW, would it still be on cooldown? How long is the cooldown?

I don't even think you NEED to detect if it has wind walk:
  • Wind Walk Reset
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Killing unit)) Equal to Blademaster
    • Actions
      • Unit - For Unit (Killing unit), end cooldown of ability Wind Walk
No need to overcomplicate this.
If you really want to be picky, we could make it a 2-step trigger with a unit indexer and boolean check on an attack event.
Besides, on the attack event, if you cancel the attack with a stop command while in WW, of course the target won't die.
 
Last edited:

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
I am pretty sure animation canceling is not an intended feature.
In practice it means that you can abuse onhit triggers.

If you have a ranged unit, shoot an attack, halfway through the animation order unit to move = event triggers
In this case it is just nitpicking, but for other triggers it can be somewhat serious.

For example, let's say you have a passive which gives a 40% chance to deal 10 extra damage.
You're about to pull a boss, do the animation but change your mind, the attack does not go off.. but the on attack event triggers and deals the 10 extra damage with aggros the unit.
This can be extra annoying if it is a passive with a cooldown and you have to wait before it is up again.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
I am pretty sure animation canceling is not an intended feature.
In practice it means that you can abuse onhit triggers.

If you have a ranged unit, shoot an attack, halfway through the animation order unit to move = event triggers
In this case it is just nitpicking, but for other triggers it can be somewhat serious.

For example, let's say you have a passive which gives a 40% chance to deal 10 extra damage.
You're about to pull a boss, do the animation but change your mind, the attack does not go off.. but the on attack event triggers and deals the 10 extra damage with aggros the unit.
This can be extra annoying if it is a passive with a cooldown and you have to wait before it is up again.
In this case, you are using the wrong event. The problem is not the event, but your thinking and expectations from the event.
This event does not provide on-hit, it provides on-attack. The event works as intended.
In this case, there does not exist a GUI event except through the adding "Unit takes damage" through trigger actions to an existing trigger.

I have to say, that it is a pretty useless event as it is. And also does not 100% correspond to what it is described to do, but that is usually a common thing between GUI events. I'd expect it to fire when the attack is released.
We have a bajillion of events for spells and only one for AA which is quite annoying.

regards
-Ned
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
What? the event fires even if you cancel the animation, this is common knowledge.
Except that is not a bug? The key is in the name...

"A unit is attacked".

Just because a unit is attacked does not mean that the attack was successful or even completed. This is why StarCraft II added many events to do this sort of thing as they each fire at different times.
In practice it means that you can abuse onhit triggers.
There is no "on hit" event to abuse in the first place... Closest is a unit takes damage.
If you have a ranged unit, shoot an attack, halfway through the animation order unit to move = event triggers
The trigger is fired the instant the unit begins to attack, as the name suggests. The attack can then be interrupted, eg by a stun or order, before it completes but the trigger has already fired. This only applies to units which have an attack backswing time, for animation purposes, since that forms a delay between an attack starting (trigger run) and the attack being performed. After the attack is performed there may still be a delay before it completes but this can largely be ignored as the attack has already been placed on cooldown.
For example, let's say you have a passive which gives a 40% chance to deal 10 extra damage.
You're about to pull a boss, do the animation but change your mind, the attack does not go off.. but the on attack event triggers and deals the 10 extra damage with aggros the unit.
This can be extra annoying if it is a passive with a cooldown and you have to wait before it is up again.
Which is why one needs to proc it from an attack damage detection system which is vaguely accurate (possibly more so now with the new natives). This way the proc would mostly correctly occur when the unit takes attack damage.

No bugs at all with that event. Although I do agree using it to try and proc an effect on attack will result in bugs in your code.
 
Status
Not open for further replies.
Top