Teams settings

Hello,

there is no settings for manage teams, in editor or lua api or both ?
E.g: color, name, model, ... in a team object

Thanks !

Hi Timrael,
You can find Team Settings by going to the Toolbar, then hovering over Object > Create Settings Object > Create Team Settings. This will let you choose a mode for teams, and each spawn point also has a Gameplay property "Team" so you can make different teams spawn at different points. Right now, Core supports up to 4 teams.

Hope that helps! :slight_smile:

1 Like

Yes, but have only "Team mode", no color choice or other settings.
At the end, I want to retrieve (from script) the team color of player who make a specific action.

Thank you for your attention to this question. :+1:

Hi Timrael,
The way teams currently works is that anybody who is on the same team (meaning the .team property's integer matches yours) will show up in blue. All people on a different team will be in red. Meaning, if you are on Team 1, everyone on Team 2, 3, and 4 would all look red to you.

So if you wanted to get the team of a player who makes a specific action, you would do something like...

local player = Game.GetLocalPlayer()
print(tostring(player.team))

and dependent on what returns, you can set the color of an object. There is also another property in the API for isTeamColorUsed on a few classes if you want a particular object to be set to a team (and then be made blue if friendly, red if enemy) for a flag/turret/etc.

Ok, I watch after work, just for information, I want to make 2 or 4 teams (so differents colors) for a "sport" game.

EDIT: ok so if i understand correctly, i have to define colors manually on all objects / players.
Agreed, I will do that hoping that you will change the team system. :slight_smile:

Thanks for informations !

1 Like