• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

area of effect damaging trigger?

Status
Not open for further replies.
Level 4
Joined
Oct 18, 2010
Messages
55
Hello all. Im a beginner mapper. Just want to ask simple question:

I was creating blizzard spell-like trigger which was dealing lets say 4x INT. But when i wanted it to damage AOE i used the "Unit - Damage Area" action. Problem is it was damaging friendly units too. Can someone please show me another way to make the same spell so it will damage only enemy units?

thanks :)
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Untitled Trigger 037
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to War Stomp
    • Actions
      • Set u1 = (Triggering unit)
      • Set p1 = (Position of u1)
      • Set Player = (Owner of u1)
      • Set r1 = (4.00 x (Real((Level of War Stomp for u1))))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 512.00 of p1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of Player) Equal to True) and (((Matching unit) is A flying unit) Equal to False)))) and do (Actions)
        • Loop - Actions
          • Unit - Cause u1 to damage (Picked unit), dealing r1 damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation(udg_p1)
It filters out dead, allied, neutral and flying units. Magic immune could be filtered also and other stuff you don't want to damage.
 
Status
Not open for further replies.
Top