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

What to add to my trigger so units dont attack the flag

Status
Not open for further replies.
Level 8
Joined
Nov 21, 2008
Messages
316
This is a breakdown of somethings in the map along with the trigger. When units on the map die, an invulnerable flag pops up to mark there grave. The problem with my attack trigger is the units that spawn to kill players may head to the flag, which is what i dont want. what part of my trigger must i chance so they can be excluded from attack position. (flag is a unit)
  • Grunt Wave
    • Events
      • Time - Every 2.25 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to Player 11 (Dark Green)) or ((Owner of (Matching unit)) Equal to Player 12 (Brown))))
      • Set TempGroup2 = (Units in (Playable map area) matching (((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True))
      • Set Unitposition = (Position of (Random unit from TempGroup2))
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set Spawn_Point2[1] = (Random point in SpawnRegions2[(Random integer number between 1 and 3)])
          • Unit - Create 1 Grunt for Player 12 (Brown) at Spawn_Point2[1] facing Default building facing degrees
          • Unit - Order (Last created unit) to Attack-Move To Unitposition
          • Unit - Create 1 Grunt for Player 11 (Dark Green) at Spawn_Point2[1] facing Default building facing degrees
          • Unit - Order (Last created unit) to Attack-Move To Unitposition
          • Custom script: call RemoveLocation (udg_Spawn_Point2[1])
          • Custom script: call RemoveLocation (udg_Spawn_Point2[bj_forLoopAIndex])
          • Wait 0.00 seconds
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: call DestroyGroup(udg_TempGroup2)
      • Custom script: call RemoveLocation(udg_Unitposition)
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
Add
  • (Unit-type of (Matching unit)) Not equal to Flag
to your group enumeration.
Example:
  • Set TempGroup2 = (Units in (Playable map area) matching (((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True)) and (Unit-type of (Matching unit)) Not equal to Flag
BTW, what's the point of TempGroup?

Also, I don't think you need
  • Custom script: call RemoveLocation (udg_Spawn_Point2[bj_forLoopAIndex])
 
Status
Not open for further replies.
Top