# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/prop-hunt-05-game-loop-and-round-management-in-unreal-editor-for-fortnite
# Local doc: epic-docs/documentation/en-us/fortnite/prop-hunt-05-game-loop-and-round-management-in-unreal-editor-for-fortnite.md
# Section: Setting Up Teams
# When a round is started, subscribe to team devices, randomly pick the hunter agents, enable the hunter timer, set the prop agents, and teleport them into the game area.
SetUpTeams()<suspends>:void =
Logger.Print("Setting up teams.")
# Subscribe to the prop team score timer, set the score award, and subscribe to the prop team's eliminated event.
PropTeam.ScoreTimer.SuccessEvent.Subscribe(PropTeam.OnPropsScore)
PropTeam.ScoreManager.SetScoreAward(PropTeam.ScorePerSecond)
PropTeam.TeamManager.TeamMemberEliminatedEvent.Subscribe(OnPropEliminated) # Occurs when a prop agent is eliminated.
# Subscribe to the hunter team's wait timer and set the duration. Also, subscribe to the hunter team's elimination event.
HunterTeam.WaitTimer.SuccessEvent.Subscribe(HuntersGo)
HunterTeam.WaitTimer.SetMaxDuration(HunterTeam.SpawnDelay)
HunterTeam.TeamManager.EnemyEliminatedEvent.Subscribe(OnHunterEliminated) # Occurs when a hunter agent eliminates a prop agent.
Verse Library
verse
03 Setting Up Teams
Configures prop and hunter teams by linking score timers, elimination events, and spawn delays to handlers.
extracted-snippets/documentation/en-us/fortnite/prop-hunt-05-game-loop-and-round-management-in-unreal-editor-for-fortnite/03-setting-up-teams.verse