Game Instance Controller
Enables team-based gamemodes in your world.
Team Properties
Section titled “Team Properties”Teams each have their own set of properties and events.
Position of the team in the list of teams.
Name of the team.
Color associated with the team.
Player Limit
Section titled “Player Limit”Maximum number of players allowed in the team.
Starting Score
Section titled “Starting Score”Score the team has at the start of a game.
Team Events
Section titled “Team Events”Team events are hooks controlled by the team.
Team Joined Event
Section titled “Team Joined Event”Fires when a player joins the team.
Team Leave Event
Section titled “Team Leave Event”Fires when a player leaves the team.
Team Win Round Event
Section titled “Team Win Round Event”Fires when the team wins the current round.
Team Win Game Event
Section titled “Team Win Game Event”Fires when the team wins the game.
Global Properties
Section titled “Global Properties”Properties that control all teams and game conditions.
Balance Team Join
Section titled “Balance Team Join”When enabled, new players are assigned to the team with the fewest players.
Auto Balance Teams
Section titled “Auto Balance Teams”When enabled, players can be reassigned to a different team as new players join, regardless of their initial selection.
Ready Percentage
Section titled “Ready Percentage”Percentage of players who must be marked ready before the ready timer activates.
Ready Timer
Section titled “Ready Timer”After the ready percentage is met, the time in seconds before the game starts.
Game Controller Type
Section titled “Game Controller Type”- Default Score-based gamemode.
- Combat System Elimination-based gamemode.
Game Type
Section titled “Game Type”- Single Each game is one round.
- Rounds Each game consists of the number of rounds set in Rounds To Win.
Rounds To Win
Section titled “Rounds To Win”Number of rounds a team needs to win to end the game.
End Condition
Section titled “End Condition”- Score When a team reaches the score in End Score, the game or round ends.
- Time When the time in End Time (seconds) is reached, the game or round ends.
- Time or Score Ends when Time or Score is met.
- Elimination (Combat System only) Ends when only one team remains.
- Time or Elimination (Combat System only) Ends when Time or Elimination is met.
End Score
Section titled “End Score”Score required to win a round or game.
End Time
Section titled “End Time”Time in seconds before a round or game ends.
Global Events
Section titled “Global Events”Hooks controlled by the Game Instance Controller.
Game Started Event
Section titled “Game Started Event”Fires when the game starts.
Round Started Event
Section titled “Round Started Event”Fires when the round starts.
Game Ended Event
Section titled “Game Ended Event”Fires when the game ends.
Round Ended Event
Section titled “Round Ended Event”Fires when the round ends.
Methods
Section titled “Methods”Methods that can be called from Custom Triggers in the CVR Interactable component.
EnemyScore
Section titled “EnemyScore”Set the enemy score relative to the local player.
JoinTeamAutoBalance
Section titled “JoinTeamAutoBalance”Joins the team with the fewest players.
LeaveTeam
Section titled “LeaveTeam”Leaves the current team.
OwnScore
Section titled “OwnScore”Sets the score of the local player’s team.
StartGame
Section titled “StartGame”Starts the game regardless of Ready Percentage or Ready Timer.
ToggleReady
Section titled “ToggleReady”Marks the local player as ready or not ready.
TryJoinTeam
Section titled “TryJoinTeam”Attempts to join the team specified by the Team Index property.
Animator integration
Section titled “Animator integration”When the GameInstanceController has an Animator with a runtimeAnimatorController, the controller forwards these parameters every score / status update:
teamScore0,teamScore1, … — one per team, set toteam.currentScore.status— matches the currentGameStateskey (0: waiting,5: ready up,7: round starting,10: game in progress).timer— current round timer in seconds.
Reference ID
Section titled “Reference ID”Reference ID
Section titled “Reference ID”string GUID auto-generated on Reset(). Used by the server to track the instance controller. Do not edit manually.
Related
Section titled “Related”Source
Section titled “Source”CVR-GameFiles/ABI.CCK.Components/GameInstanceController.cs, CVR-GameFiles/ABI.CCK.Components/Team.cs