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

[Trigger] Player 12 global trigger...

Status
Not open for further replies.
Level 6
Joined
Oct 4, 2011
Messages
226
Hello, I have started a Maze project recently. I have tried making my own system so that any unit not owned by player 12 (besides footmen) are killed if they are (128, 12:cool: in range of any of player 12's matching units. I add in conditions because I am going to have certain units that you are allowed to touch where as others will kill you if you get hit by them. It seems to work on one of the player 12 units that I have but some others dont register.
  • Mazer death1
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set DeathGroup1 = (Units owned by Player 12 (Brown) matching (((Unit-type of (Matching unit)) Not equal to Footman) and (((Matching unit) is A structure) Equal to False)))
      • Unit Group - Pick every unit in DeathGroup1 and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Set TempLocation = (Position of TempUnit)
          • Unit Group - Remove TempUnit from DeathGroup1
          • Set DeathGroup2 = (Units within 128.00 of TempLocation matching (((Unit-type of (Matching unit)) Not equal to Footman) and ((Owner of (Matching unit)) Not equal to Player 12 (Brown))))
      • Custom script: call RemoveLocation(udg_TempLocation)
      • Unit Group - Pick every unit in DeathGroup2 and do (Actions)
        • Loop - Actions
          • Set TempUnit2 = (Picked unit)
          • Unit - Kill TempUnit2
          • Unit Group - Remove TempUnit2 from DeathGroup2
If anyone knows how to do what I want better, then please suggest it! :fp::goblin_yeah:
 
Level 6
Joined
Oct 4, 2011
Messages
226
Wow thats pretty cool! So what your doing is adding an event for each unit from the unit group. Interesting! I will try to use this technique/ +rep!
 
Status
Not open for further replies.
Top