Hello, I'm brand new to map making so I decided to just attempt a port over of one of my favorite maps (won't say which yet). There's something I'm having trouble finding (bolded).
Player Group - Pick every player in (All players controlled by a Computer player) and do (Actions)
I can't seem to find a way to just use computer players in such a way I need. There's going to be two teams versing each other co-oped with computers on each respective team, and I'm trying to set up a handicap system in-game just for the computers.
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)
Hello, I'm brand new to map making so I decided to just attempt a port over of one of my favorite maps (won't say which yet). There's something I'm having trouble finding (bolded).
Player Group - Pick every player in (All players controlled by a Computer player) and do (Actions)
I can't seem to find a way to just use computer players in such a way I need. There's going to be two teams versing each other co-oped with computers on each respective team, and I'm trying to set up a handicap system in-game just for the computers.
Hope I explained it well enough.
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)
Ah, that should do it, thanks!