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

[Trigger] Make a unit cast a spell in an unit affected by another spell

Status
Not open for further replies.
Level 7
Joined
Apr 28, 2006
Messages
113
I want, for example, to make via trigger a DH cast mana burn in a unit affected by a Blizzard spell. So, when an unit is attacked with Blizzard, the DH casts mana burn at it.

How?

Thanks.
 
Level 5
Joined
Dec 17, 2007
Messages
145
I don't entirely understand...

So you're saying that when a unit is hit by the spell Blizzard, you want that unit to get hit with a Mana Burn?

Why, that's easy. If you can use JASS it will be even easier.

Simply: (Assuming you're using JASS)

-Make a trigger that fires when a unit starts the effect of an ability.
-Check that the ability being cast is Blizzard.
-Make your trigger JASS.
-Create all necessary locals and stuff.
-Now, create a loop that exits when the caster is no longer channeling Blizzard. (Check the unit's current order.)
-In the loop, pick every unit within X range of the target point (of the ability). Filter out anyone who wouldn't be effected by your Blizzard spell. Checking for a buff may work too, but I'm not 100% sure. (Due to timing issues.)
-Now just go through every unit and make a dummy caster use a dummy Mana Burn on them.
-Clean up after yourself.

That's about how it's done.

If you want a specific Demon Hunter to cast Mana Burn, not a dummy... then that's wayyyyyy harder and I can't help you there.
 
Status
Not open for further replies.
Top