• 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] How to start an event when 1 unit from each team enters a region

Status
Not open for further replies.
Level 18
Joined
Oct 18, 2007
Messages
930
  • event - that guy enters that region
  • if that guy is in group bleh then
    • set count = count + 1
  • if count = 2 then
    • *YOUR TRIGGERS HERE*
  • event - that guy enters that region
  • if that guy is in group ult then
    • set count = count + 1
  • if count = 2 then
    • *YOUR TRIGGERS HERE*
Its a bit simple but it should work
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
Do remember also to make a trigger that removes 1 from the counter when there are no units of a player in the region.

To make this perfect, you should make the counter activate when the number reaches the amount of players playing, not a specific value (since more or less players can play the game, so you don't know how high the 'count' integer is)
 
Level 8
Joined
Mar 12, 2008
Messages
437
  • Trigger
    • Events
      • Unit - A unit events Region56B
    • Conditions
      • ...
    • Actions
      • Player Group - Pick every player in (All players matching (((Picked player) slot status) Equal to Is playing)) and do (Actions)
        • Loop - Actions
          • If (All Conditions) are True then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in Region56B owned by (Picked player)) greater than or equal to 1
            • Then - Actions
              • ...
            • Else - Actions
              • ...
Not sure if this will work though.
This will trigger when all players have at least one unit in the region.
 
Status
Not open for further replies.
Top