Page 1 of 1

Getting teams with players

PostPosted: 01 Oct 2015, 12:54
by grayter
Hello,
is there any command in dynamic scripts to get all multiplayer teams and all players in those teams? Something like this:
1) GetAllTeams()
2) PlayerGetTeam(playerId)

is there is no such function is there a way to accomplish this in another way?

Re: Getting teams with players

PostPosted: 01 Oct 2015, 15:41
by Strangelove
Hey grayter,
as far as i know there is no such dynamic script command. I guess you can do it by checking for Player Alliances. Actions.PlayerAllianceCheck would be the command you are looking for.

Re: Getting teams with players

PostPosted: 01 Oct 2015, 22:19
by RandomLyrics
u mean, GetAllTeams() returns team_count: integer? or returns array of teams of players? Team[team-red][player0]. same question for PlayerGetTeam(playerId)

Re: Getting teams with players

PostPosted: 02 Oct 2015, 07:20
by grayter
u mean, GetAllTeams() returns team_count: integer? or returns array of teams of players? Team[team-red][player0]. same question for PlayerGetTeam(playerId)
GetAllTeams returns array of id of all teams
PlayerGetTeam returns id of team for specified player

Hey grayter,
as far as i know there is no such dynamic script command. I guess you can do it by checking for Player Alliances. Actions.PlayerAllianceCheck would be the command you are looking for.
Yeah I know it but then I will not be able to determine id of team but this is important to me.

Re: Getting teams with players

PostPosted: 15 Dec 2015, 18:54
by thibmo
This is indeed not a thing in dynamic scripts.
You might want to create a feature request on this one.