Question about player triggers

Status
Not open for further replies.
Try this:

  • RegionCounter
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set VariableSet TempUnitGroup = (Units in FunZone <gen> owned by (Player((Integer A))))
          • Set VariableSet TempInteger = (Number of units in TempUnitGroup)
          • Custom script: call DestroyGroup (udg_TempUnitGroup)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TempInteger Greater than 0
            • Then - Actions
              • Player Group - Add (Player((Integer A))) to PlayersInFunZone
            • Else - Actions
              • Player Group - Remove (Player((Integer A))) from PlayersInFunZone.
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in PlayersInFunZone) Equal to 2
        • Then - Actions
          • Game - Display to (All players) the text: 2 Players!
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in PlayersInFunZone) Equal to 3
        • Then - Actions
          • Game - Display to (All players) the text: 3 Players!
        • Else - Actions
      • -------- etc, etc... --------
The loop 1 to 12 is for however many players you have (12 for 12 players).

TempUnitGroup is a Unit Group variable, TempInteger is an Integer variable, PlayersInFunZone is a Player Group variable.
 
Status
Not open for further replies.
Back
Top