I've been searching the web for reason why an empty player group is not returning as empty. When a player spawns they are added to "PlayerDidNotEscape" player group variable. When a player gets to the escape area, they are loaded into the escape vehicle and the player is removed from "PlayerDidNotEscape" and added to "PlayerDidsEscape" player group, and if all players have made it to the escape area the game will end prematurely.
Unfortunately "PlayerDidNotEscape" does not return as empty, the debug text doesn't show and the game does not end. When checking the SC2 debug window the player group is showed as empty so I would assume the condition is met. I have no clue why this does not work (the rest of the trigger works, just not the if/then/else statement).
RescueBoardAllroundEventsUnit-AnyUnitEntersadistanceof3.0fromDropship[85.59,217.12]LocalVariablesConditions(Unittypeof(Triggeringunit))==Survivor((Ownerof(Triggeringunit))isinPlayerDidNotEscape)==TrueActionsUI-Display(Combine("<s val="VictoryPanelVictory">",(Nameofplayer(Ownerof(Triggeringunit)))," has escaped!"))for(Allplayers)toSubtitleareaPlayerGroup-Removeplayer(Ownerof(Triggeringunit))fromPlayerDidNotEscapePlayerGroup-Addplayer(Ownerof(Triggeringunit))toPlayerDidEscapeUnit-Changeownershipof(Triggeringunit)toplayer15andRetainColorUnit-OrderRescueVehicleto(Rescue-Load(Gen)targeting(Triggeringunit))(ReplaceExistingOrders)General-If(Conditions)thendo(Actions)elsedo(Actions)IfPlayerDidNotEscape==(Emptyplayergroup)ThenUI-Display"Empty group"for(Allplayers)toSubtitleareaTrigger-RunRescueLeaves(CheckConditions,Don't Wait until it finishes)Else
Seems like this is always returning false. So, the comparison of unit groups does not compare the content, it compares if both sides reference the same object in memory.
"(Empty player group)" should return a reference to a new, empty player group.
To solve your problem, you should use "Number of players in PlayerDidNotEscape == 0" as the condition of the if.
I've been searching the web for reason why an empty player group is not returning as empty. When a player spawns they are added to "PlayerDidNotEscape" player group variable. When a player gets to the escape area, they are loaded into the escape vehicle and the player is removed from "PlayerDidNotEscape" and added to "PlayerDidsEscape" player group, and if all players have made it to the escape area the game will end prematurely.
Unfortunately "PlayerDidNotEscape" does not return as empty, the debug text doesn't show and the game does not end. When checking the SC2 debug window the player group is showed as empty so I would assume the condition is met. I have no clue why this does not work (the rest of the trigger works, just not the if/then/else statement).
Try Number Of Players In Playergroup instead.
Seems like this is always returning false. So, the comparison of unit groups does not compare the content, it compares if both sides reference the same object in memory.
"(Empty player group)" should return a reference to a new, empty player group.
To solve your problem, you should use "Number of players in PlayerDidNotEscape == 0" as the condition of the if.
@Ahli634: Go
That might explain my previous issues on this elsewhere. Changing it to "Number of Players in X" worked, so thanks to you guys.