• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Colors such as peach not being added to player group

Level 5
Joined
Sep 20, 2024
Messages
31
Hi, I have a bug where 2 players that have the "new" player colors peach and emerald are not being added to a player group. All other colors such as blue, teal and light blue work perfect.

In Map Initialization I add all players to the "Players" player group:
  • Player Group - Pick every player in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)).) and do (Actions)
    • Loop - Actions
      • Player Group - Add (Picked player) to Players
When intro cutscene ends I remove them and then add them back to the "Players" player group (perhaps this trigger is causing the bug because peach and emerald are added back to the player group to fast after being removed?):
  • Intro End
    • Events
    • Conditions
    • Actions
      • Player Group - Remove Player 18 (Peach) from Players.
      • Player Group - Remove Player 23 (Emerald) from Players.
      • Set VariableSet UnitGroup2 = (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to Neutral Passive) and ((Race of (Matching unit)) Equal to Human)))
      • Unit Group - Pick every unit in UnitGroup2 and do (Actions)
        • Loop - Actions
          • Unit - Change ownership of (Picked unit) to (Random player from Players) and Change color
      • Custom script: call DestroyGroup(udg_UnitGroup2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 18 (Peach) slot status) Equal to Is playing
        • Then - Actions
          • Player Group - Add Player 18 (Peach) to Players
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 23 (Emerald) slot status) Equal to Is playing
        • Then - Actions
          • Player Group - Add Player 23 (Emerald) to Players
        • Else - Actions
The triggers that later use the "Players" player group don't work for for player peach and emerald. It seems to be a bug that peach and emerald are somehow not added to the player group.

For instance when someone leaves, peach and emerald don't receive resources from leavers:
Trigger when someone leaves game:
  • Player Group - Pick every player in Players and do (Actions)
    • Loop - Actions
      • Player - Add (((Triggering player) Current gold) / (Number of players in Players)) to (Picked player).Current gold
      • Player - Add (((Triggering player) Current lumber) / (Number of players in Players)) to (Picked player).Current lumber
Trigger to share vision of boss don't work either for peach and emerald:
  • Player Group - Pick every player in Players and do (Actions)
    • Loop - Actions
      • Unit - Grant shared vision of Boss to (Picked player)
And camera pan don't work for peach and emerald:
  • Player Group - Pick every player in Players and do (Actions)
    • Loop - Actions
      • Camera - Pan camera for (Picked player) to Point18 over 0.00 seconds
 
Last edited:
I can't see anything immediately wrong with your code. But it is possible that the slot status check is failing. I recommend adding a game message (Game - Text Message) in the "Then - Actions" and one in the "Else - Actions" respectively to make sure that the players are correctly being detected as "playing" and are actually being added back into the group.

Otherwise, you may want to scour through your code and double check that nothing else is manipulating that "Players" group.
 
Back
Top