• 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.

Computer not counted in player group

Status
Not open for further replies.
Level 13
Joined
Oct 16, 2010
Messages
737
Hi

I've hit a situation that I have no idea how to solve. Here's the trigger:

  • Multiboard and Timer
    • Events
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Equal to Is playing
              • Or - Any (Conditions) are true
                • Conditions
                  • (Picked player) Equal to Player 1 (Red)
                  • (Picked player) Equal to Player 2 (Blue)
                  • (Picked player) Equal to Player 3 (Teal)
                  • (Picked player) Equal to Player 4 (Purple)
                  • (Picked player) Equal to Player 5 (Yellow)
                  • (Picked player) Equal to Player 6 (Orange)
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked player) controller) Equal to Computer
                • Then - Actions
                  • Player - Set name of (Picked player) to (Bot + (String((Player number of (Picked player)))))
                  • Player Group - Add (Picked player) to AI_Group
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Picked player) Equal to Player 1 (Red)
                      • (Picked player) Equal to Player 2 (Blue)
                      • (Picked player) Equal to Player 3 (Teal)
                • Then - Actions
                  • Player Group - Add (Picked player) to N_PlayerGroup
                • Else - Actions
                  • Player Group - Add (Picked player) to S_PlayerGroup
            • Else - Actions
      • -------- HERE IS THE PROBLEM --------
      • Player Group - Pick every player in N_PlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Add (1500 / (Number of players in N_PlayerGroup)) to (Picked player) Current gold
      • -------- ------------------------- --------
      • Player Group - Pick every player in S_PlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Add (1500 / (Number of players in S_PlayerGroup)) to (Picked player) Current gold
      • Multiboard - Create a multiboard with 2 columns and 2 rows, titled (((String(No_Rounds)) + Rounds, ) + ((String(No_Waves)) + Waves Each))
      • Set Multiboard = (Last created multiboard)
      • Multiboard - Set the display style for Multiboard item in column 0, row 0 to Show text and Hide icons
      • Multiboard - Set the width for Multiboard item in column 0, row 0 to 5.00% of the total screen width
      • Multiboard - Set the text for Multiboard item in column 1, row 1 to Round
      • Multiboard - Set the text for Multiboard item in column 2, row 1 to 1
      • Multiboard - Set the text for Multiboard item in column 1, row 2 to Wave
      • Multiboard - Set the text for Multiboard item in column 2, row 2 to 1
      • Set Round = 1
      • Set Wave = 1
      • Game - Display to (All players) for 5.00 seconds the text: ((Wave + (String(Wave))) + will begin in 30 seconds.)
      • Countdown Timer - Start ReinforcementTimer as a One-shot timer that will expire in 30.00 seconds
      • Countdown Timer - Create a timer window for ReinforcementTimer with title ((Wave + (String(Wave))) + in...)
      • Set ReinforcementTimerWindow = (Last created timer window)
The problem is when I've tested it and had me as Red and the comp as Blue. The first part of the trigger has counted both me and the comp into N_PlayerGroup (I tested this by putting messages in) but in the next part where it picks N_PlayerGroup it only gives me gold and not the computer. Strangely it gives me 750 gold like it should do so it has detected that there are 2 players in the group, just hasn't picked the computer player.

Any ideas?
 
Level 13
Joined
Oct 16, 2010
Messages
737
I'm not sure how that exactly helps my situation....


Update: I've worked out that only Red and Purple are given the gold. Those are the first in each of the player groups if that makes any difference (which it shouldn't!!!)

Update 2: Previous update seems to be the case. Tried playing as Blue and having comp as Red and they got given gold and I didn't.
 
Level 13
Joined
Oct 16, 2010
Messages
737
The problem is that although they are added to the group not all players are given gold in the part where I pick the group N_PlayerGroup. Only the first player (Red) is given gold and he is given 750 like he should but Blue/Teal get nothing.
Strangely this is exactly the same for the other team, where only purple gets given gold.
 
Status
Not open for further replies.
Top