Map Database  •  FAQ  •  RSS  •  Login

Getting teams with players

<<

grayter

Barbarian

Posts: 107

Joined: 18 Aug 2014, 12:06

KaM Skill Level: Skilled

Location: Poland

Post 01 Oct 2015, 12:54

Getting teams with players

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?
<<

Strangelove

User avatar

Crossbowman

Posts: 230

Joined: 30 Jul 2013, 06:32

KaM Skill Level: Fair

Post 01 Oct 2015, 15:41

Re: Getting teams with players

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.
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 01 Oct 2015, 22:19

Re: Getting teams with players

u mean, GetAllTeams() returns team_count: integer? or returns array of teams of players? Team[team-red][player0]. same question for PlayerGetTeam(playerId)
<<

grayter

Barbarian

Posts: 107

Joined: 18 Aug 2014, 12:06

KaM Skill Level: Skilled

Location: Poland

Post 02 Oct 2015, 07:20

Re: Getting teams with players

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.
<<

thibmo

User avatar

Council Member

Posts: 124

Joined: 03 Aug 2015, 09:12

KaM Skill Level: Skilled

Website: https://kp-wiki.org/

Location: the Netherlands

Post 15 Dec 2015, 18:54

Re: Getting teams with players

This is indeed not a thing in dynamic scripts.
You might want to create a feature request on this one.
~~ The magic wizard of PascalScriptus. ~~

KP-Wiki :
  • Information about Knights Province scripting ( unofficial )
  • Information about several hosting/server maintenance basics
  • Other random stuff

Return to “Dynamic Scripting”

Who is online

Users browsing this forum: No registered users and 11 guests