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

Simple Trigger

Status
Not open for further replies.
Level 7
Joined
Oct 20, 2010
Messages
182
I'm new to triggers, and I'm also very frustrated.

All I really am trying to do is this.

When a unit takes damage from Blizzard, Stun it.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
You can create a dummy and use a unit indexer.
That unit should use Blizzard and have an integer array variable of his index be set to the rawcode of Blizzard.
Then when a unit takes damage and the value of that integer array is equal to Blizzard, the unit has been damaged by the spell Blizzard.
At that moment, you can change the source back to the original caster (also stored in an array) and do whatever you want to do more... like stun the targets.

That is afaik the only way to detect when a specific spell damaged a unit.

EDIT:
Or instead of using an integer array variable, you can use an ability array variable.
I think I am getting a little too used to JASS.
Anyway it works the same.
 
Status
Not open for further replies.
Top