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

Detecting AoE Spells

Status
Not open for further replies.
Level 2
Joined
Jun 8, 2004
Messages
10
Hi i need help trying to detecting AoE, specifically, when a unit is being dmged by a AoE spell, I tried using conditions with targets at point, but then i couldn figure out how to obtain the "unit being casted on", is there a to pick up the unit(s) that are being targerted by AoE, like flamestrike or blizzard.
 
Level 2
Joined
Jun 17, 2004
Messages
10
AOE

As far as triggers go, spells have no properties. Meaning, there's no easy condition like "Spell is an AOE Ability." So you're going to have to list all of the AOE spells individually in your trigger's conditions, unfortunately.

AOE spells target points, not units. So the units affected are going to be all those within the range of the particular AOE spell. ...Again, since spells have no properties, you're either going to have to use a one-size-fits-all range, make a separate trigger for each AOE spell, or make a big mess with variables.

Anyway, here's a trigger:

EVENTS:

- A unit is issued an order targeting a point

CONDITIONS:

? Or (Any conditions are true)
? Issued order equal to order(flamestrike)
? Issued order equal to order(blizzard)
? (etc. for all AOE abilities in your game)

ACTIONS:

> Pick every unit in (Units within 500* of (Target point of issued order) matching ((Owner of Matching unit) is an enemy of (Owner of Ordered unit) equal to true and do Actions:

>> Whatever it is you want to do to the units hit by the AOE spell

Different AOE spells have different areas of effect, obviously, so either you just use 500 or whatever for all of them or make a different trigger for each particular AOE spell.

The Order Comparison condition uses the order STRING, not the name of the ability itself. To find this, just open the ability editor and look for the ability's "Text - Order String - Use/Turn on" stat.

Finally, you should add conditions to the "Pick every unit in ______" action based on the "Targets Allowed" stat of your AOE spell. The way I have it set up, the only condition is that the affected unit is an enemy of the player casting the AOE spell. If the spell only hits ground units or whatever, then just string on more conditions with the "And" condition.

And again, for targets allowed, you'll either have to use this trigger for every AOE spell or make separate triggers for each of them.

Hope it helps.
 
Status
Not open for further replies.
Top