# For Each Player In Player Group
Grammar — For each player var|Player in group do (Actions)
Flags —SubFunctions
|Action
Executes a For Loop using an integer value. This will run the action set included under the For Each Player In Player Group action for every player in the specified player group. For example: If you put a “Set Player Color” action that changed the color for Player
# Arguments
anyvariable
— Player Variableplayergroup
— Player Group
Returns — void
#AUTOVAR(g, playergroup) = #PARAM(group);
#PARAM(var) = -1;
while (true) {
#PARAM(var) = PlayerGroupNextPlayer(#AUTOVAR(g), #PARAM(var));
if (#PARAM(var) < 0) { break; }
#SUBFUNCS(actions)
}
# Related
Category: Player Group / Loops
- For Each Player In Player Group — macro
- For Each Player In Player Group Deprecated — macro
- Pick Each Player In Player Group — macro
- Pick Each Player In Player Group Deprecated — macro
- Picked Player
- Picked Player Deprecated —
int
— PlayerGroupLoopCurrentDeprecated
# Examples
— None found —