Getting the teams designated to the players in the lobby

Information and discussion for custom maps and mods.
Post Reply
ephja
Posts: 11
Joined: Mon Dec 21, 2015 8:19 pm

Getting the teams designated to the players in the lobby

Post by ephja »

Player.PlayerReference.Team appears to be set to 0 for everyone. I've tested this in a game with me and a bot; each of whom is designated a separate team.

User avatar
Sleipnir
Posts: 878
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Post by Sleipnir »

PlayerReference.Team holds the default team that is set in the map.yaml. Use Client.Team if you want to query the final team as selected (or forced) in the lobby.

noobmapmaker
Posts: 1086
Joined: Wed Dec 10, 2014 11:59 am

Post by noobmapmaker »

I could be wrong but for RA you have to add

Code: Select all

LockTeam: True
Team: 1
Example from Fort Lonestar

Code: Select all

	PlayerReference@Multi0:
		Name: Multi0
		Playable: True
		AllowBots: False
		LockTeam: True
		Team: 1
		LockFaction: True
		Faction: allies
		Allies: Multi1, Multi2, Multi3
		Enemies: Soviets
Playlist with ALL games of the Dark Tournament Youtube.com/CorrodeCasts
Consider supporting OpenRA by setting a bounty or by donating for a server

ephja
Posts: 11
Joined: Mon Dec 21, 2015 8:19 pm

Post by ephja »

Ok so clients can refer to bots too. Thanks.

Post Reply