• 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.

How do i make it target this?

Status
Not open for further replies.
Level 4
Joined
Jun 13, 2014
Messages
77
I'm trying to make a boss cast spells at only heroes not the summons around them. However it currently hits minions and heroes. How can i add multiple conditions for the matching unit variable set, as in make it set the variable to a hero that belongs to an enemy player.


  • web
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set Webgroup = (Units in spiderweb <gen> matching (((Matching unit) belongs to an enemy of Neutral Hostile) Equal to (==) True))
      • Set webrandom = (Random unit from Webgroup)
      • Unit - Order Spiderboss to Night Elf Keeper Of The Grove - Entangling Roots webrandom
      • Custom script: call DestroyGroup( udg_Webgroup )
 

Rheiko

Spell Reviewer
Level 26
Joined
Aug 27, 2013
Messages
4,214
Do something like this instead
  • Web
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in YourRegion and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of Neutral Hostile) Equal to True
              • ((Picked unit) is A Hero) Equal to True
            • Then - Actions
              • Bla bla bla
            • Else - Actions
This way, you can read it easier
 
Status
Not open for further replies.
Top