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

If a unit is touched by ability

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,515
I attached 2 maps with triggered Shockwaves. The Stun version is basically the same thing as the other map but with a Dummy unit added to it that will Stun enemy units.

Alternatively, you could achieve this using a Damage Engine, a "fake" shockwave ability, a real Shockwave ability, and a unique Dummy Unit that is used exclusively for this effect.

What you do is give your Hero a "fake" Shockwave ability (no effect, just a tooltip/icon/cooldown and should behave like Shockwave), and then in response to him casting this you create the unique Dummy unit and order it to cast the real Shockwave ability. Then using the Damage Engine you create a trigger to detect when damage is dealt by said Dummy unit and stun the damaged unit in response using a 0 damage Storm Bolt.

The only quirk with the above solution is that the Damage Engine (at least Bribe's system) will detect 0 damage and fire a Damage Event for the Storm Bolt. So your 0 damage Storm Bolt that we're using to Stun the units will fire the Damage Event trigger which will crash the game because it creates an infinite loop (a unit takes damage -> deal damage to unit). So you'll either want to use a different type of Dummy unit to Stun the enemies or check if the DamgeEventAmount (damage that was dealt) was greater than 0 so the Damage Event trigger ignores Storm Bolt.
 

Attachments

  • Custom Shockwave v.2 Stun.w3x
    31.4 KB · Views: 30
  • Custom Shockwave v.2.w3x
    24.9 KB · Views: 24
Last edited:
Status
Not open for further replies.
Top