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

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 )
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
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