Captain Picking System, check please!

Status
Not open for further replies.
Level 10
Joined
Nov 28, 2008
Messages
655
  • Team Picking System
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) for 0.00 seconds the text: Please wait while the Captains choose the teams...
      • Trigger - Run Roll <gen> (checking conditions)
      • Trigger - Run Captains Pick System Info <gen> (checking conditions)
  • Roll
    • Events
    • Conditions
    • Actions
      • Set Coin = (Random integer number between 1 and 2)
      • If (Coin Equal to 1) then do (Set Captain_In_Control = Player 1 (Red)) else do (Set Captain_In_Control = Player 2 (Blue))
      • If (Coin Equal to 1) then do (Set Captain_Not_Control = Player 2 (Blue)) else do (Set Captain_In_Control = Player 1 (Red))
      • If (Coin Equal to 1) then do (Set Spawn_Side = WR Red Side <gen>) else do (Set Spawn_Side = WR Blue Side <gen>)
  • Captains Pick System Info
    • Events
    • Conditions
    • Actions
      • If (Captain_In_Control Equal to Player 1 (Red)) then do (Game - Display to (Player group(Player 1 (Red))) the text: Select the player you wish to put on your team.) else do (Game - Display to (Player group(Player 2 (Blue))) the text: Select the player you wish to put on your team.)
      • If (Captain_In_Control Equal to Player 1 (Red)) then do (Game - Display to (Player group(Player 1 (Red))) the text: Select the player you wish to put on your team.) else do (Game - Display to (Player group(Player 2 (Blue))) the text: Select the player you wish to put on your team.)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Number of players in Red_Team_Players) + (Number of players in Blue_Team_Players)) Equal to Number_of_Players
        • Then - Actions
          • Game - Display to (All players) the text: Map picking can start!
        • Else - Actions
          • Trigger - Turn on Captains Pick System <gen>
  • Captains Pick System
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
    • Conditions
      • Captain_In_Control Equal to (Triggering player)
    • Actions
      • Unit - Move (Triggering unit) instantly to (Random point in Spawn_Side)
      • If ((Owner of (Triggering unit)) Equal to Player 1 (Red)) then do (Player Group - Add (Owner of (Triggering unit)) to Red_Team_Players) else do (Player Group - Add (Owner of (Triggering unit)) to Blue_Team_Players)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Captain_In_Control Equal to Player 1 (Red)
        • Then - Actions
          • Set Captain_In_Control = Player 2 (Blue)
        • Else - Actions
          • Set Captain_In_Control = Player 1 (Red)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Captain_Not_Control Equal to Player 1 (Red)
        • Then - Actions
          • Set Captain_Not_Control = Player 2 (Blue)
        • Else - Actions
          • Set Captain_Not_Control = Player 1 (Red)
      • Trigger - Turn off (This trigger)
I am sure it leeks, and it hasn't been 100% tested yet, but how does it look as of now? (need a full house to test, and the map is still heavily an Alpha, so can't really test it yet...)

Any actual help will +rep, :thumbs_up:



Edit:

A little more background to this:

|Red Captain|_______ |Blue Captain|
R_________ | player 1 | B
E_________ | Player 2 | L
D_________ | player 3 | U
___________| Etc...... | E

They are all in the middle, and the captains take turns selecting a hero in the middle, and they get moved to that side, and are on the team's player group.

When they are all picked, it says: "Map choosing can now begin" or whatever I put it as, and that will be where the captain will choose a map, then a mode, then start the game, etc... But I want to make sure this part works first...
 
Level 10
Joined
Nov 28, 2008
Messages
655
Supposed to do:
Alternates between red and blue getting to select another player's hero, and having that selected player added to the player group "red" or "blue".

What it does:
displays the text messages to the players like 4 times in a row, and selecting doesn't work in alternating, they can both just pick whenever.



so like, grade school gym class, 2 captains take turns picking the kids, until they are all done.

This is a really messy way of doing it, any suggestions on how to fix this, or a simpler way, would be appreciated.
 
Status
Not open for further replies.
Top