A lobby package that allows the users to select their teams. It allows for any number of teams to be defined as well as various settings for fine-tuning to your games requirements, such as auto-balancing and min/max users per team.
Note this is relatively new and only tested in one game so there are likely to be issues. Let me know if you find any problems.
How to use:
- Define your teams, so for each team you want:
a) Create a Locator or appropriate Entity to handle the definition of the team.
b) Attach the “TeamDefinition” script to it.
c) Setup the properties of that team such as the name and color.
- Setup the “LobbyLogic” script:
a) Add it to an appropriate entity/template.
b) Add the team definitions you created to its properties.
c) Add an event trigger to the “OnRoundStart” event that handles starting your game round.
d) Setup the various other properties as you see fit.
- Setup "LobbyTeamSelector"s for each team:
a) Create a Trigger or interactable entity.
b) Attach the “LobbyTeamSelector” to it.
c) Ensure that the “LobbyTeamSelector:OnPlayerSelect” method is triggered on enter/interact.
- Add an “AssignedTeam” script to the user template.