• 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] +2 players

Status
Not open for further replies.
Level 6
Joined
Dec 9, 2007
Messages
208
Any know how to make the trigger where u have to be atleast 2 players to play the game? :wsmile:
 
Level 6
Joined
Nov 28, 2007
Messages
203
yup :D (cre8ting trigger)

[EDIT]: Here it is :) (it's only for 5 players.)
  • Check Players
    • Events
      • Map initialization
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Equal to Is playing
        • Then - Actions
          • Set Players_InGame = (Players_InGame + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 2 (Blue) slot status) Equal to Is playing
        • Then - Actions
          • Set Players_InGame = (Players_InGame + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 3 (Teal) slot status) Equal to Is playing
        • Then - Actions
          • Set Players_InGame = (Players_InGame + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 4 (Purple) slot status) Equal to Is playing
        • Then - Actions
          • Set Players_InGame = (Players_InGame + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 5 (Yellow) slot status) Equal to Is playing
        • Then - Actions
          • Set Players_InGame = (Players_InGame + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Players_InGame Greater than or equal to 2
        • Then - Actions
        • Else - Actions
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Game - Defeat (Picked player) with the message: your message
 
You can use a loop for easier use too:
  • CheckPlayer
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Set Players = (Players + 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Players Less than 2
        • Then - Actions
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Game - Defeat (Picked player) with the message: <Message>
        • Else - Actions
 
Status
Not open for further replies.
Top