Get Players Controlled By
Options: Function
Return Type: Player Group
Parameters
Player Group = (All players) <Player Group>
Controller = Computer <Player Controller>
Grammar Text: Get Players Controlled By(Player Group, Controller)
Hint Text: (None)
Custom Script Code
Local Variables
tmp pg = (Empty player group) <Player Group>
Actions
Player Group - Pick each player in Player Group and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Controller of player (Picked player)) == Controller
Then
Player Group - Add player (Picked player) to tmp pg
Else
General - Return tmp pg
This function can then be used in all your player-loops:
Player Group - Pick every player in (Get Players Controlled By((All Players), Computer) and do (Actions)
Write your own function:
Get Players Controlled By
Options: Function
Return Type: Player Group
Parameters
Player Group = (All players) <Player Group>
Controller = Computer <Player Controller>
Grammar Text: Get Players Controlled By(Player Group, Controller)
Hint Text: (None)
Custom Script Code
Local Variables
tmp pg = (Empty player group) <Player Group>
Actions
Player Group - Pick each player in Player Group and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Controller of player (Picked player)) == Controller
Then
Player Group - Add player (Picked player) to tmp pg
Else
General - Return tmp pg
This function can then be used in all your player-loops:
Player Group - Pick every player in (Get Players Controlled By((All Players), Computer) and do (Actions)