Game Loop and Round Management
5. Game Loop and Round Management
Setting Up Teams
Setting Up Teams
In this section, you’re learning to set up the Hunter and Prop teams at the start of the game and teleport them to their starting areas.
This page includes Verse snippets that show how to execute gameplay mechanics needed in this gameplay. Follow the steps below and copy the full script on step 6 of this tutorial.
Follow these steps to set your teams up correctly:
-
Create a new function SetupTeams(). Here you’ll set up multiple subscriptions to functions you’ll define later, such as functions for when a prop is eliminated, or what to do when a player joins the game.
| | # 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.") | Copy full snippet -
First subscribe to the prop team’s score timer SuccessEvent, the prop team TeamManager’s Eliminated Event, and set the score manager’s score awarded.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.