• 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] Tournament help please

Status
Not open for further replies.
Level 6
Joined
Apr 14, 2007
Messages
109
Im making a map that has a tournament in it and I can figure out everything but how to make the unit that entered into the tournament first and the unit that entered second be the first two to fight and the third to enter would be in the second round and so on and so forth. Can someone tell/show me how to make a GUI trigger that can do that?
 
Level 4
Joined
Feb 4, 2008
Messages
82
  • Melee Initialization
    • Events
      • Unit - A unit enters Region1 (the region which will trigger the tournament event)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Region1))) Equal to 0 (Region1 = region where your players will be teleported from to the battle area)
        • Then - Actions
          • Unit - Move (Triggering unit) instantly to (Center of (Region2)) (Region2 = Battle area)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units in (Region2))) Equal to 2
        • Then - Actions
          • Unit - Move (Triggering unit) instantly to (Center of (Region3)) (Where Region3 is the region where the other players will wait for the other fighting players to finish
        • Else - Actions
You can also add a variable
  • Set x = (Number of units in (Units in (Region)))
so you can count the players in the region with it and then if the variable is equal to 2 (desired no. of players to fight together) then
  • Unit - Move (Triggering unit) instantly to (Center of (Region3)) (Where Region3 is the region where the other players will wait for the other fighting players to finish
    • Else - Actions
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Actions
    • For each (Integer A) from 1 to maximum_Number_Of_Units, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Unit[(Integer A)] Equal to No unit
          • Then - Actions
            • Set Unit[(Integer A)] = (Triggering unit)
            • Skip remaining actions
          • Else - Actions
 
Status
Not open for further replies.
Top