Finding Players At Runtime
2. Finding Players at Runtime
This section shows how to find players and teams at runtime that you set up earlier.
This section shows how to find players and teams at runtime that you set up earlier.
Defining Class Members
- Open Verse Explorer and double-click triad_infiltration_game.verse to open the script in Visual Studio Code.
- At the top of the file, add
using { /Verse.org/Random }to access theShuffle()function. You'll use this to randomly shuffle teams of players before balancing. Also addusing { /Fortnite.com/FortPlayerUtilities }to access theRespawn()function for players, which you'll use later to teleport players to their spawn areas at the start of the game.| | using { /Fortnite.com/Devices } | | --- | --- | | | using { /Fortnite.com/FortPlayerUtilities } | | | using { /Verse.org/Simulation } | | | using { /Verse.org/Random } | | | using { /UnrealEngine.com/Temporary/Diagnostics } | Copy full snippet - In the
triad_infiltration_gameclass definition, add the following fields:- Three editable integers named
MaximumInfiltrators,MaximumAttackers, andMaximumDefenders. InitializeMaximumInfiltratorsto 2 andMaximumAttackersandMaximumDefendersto 4. These track the maximum number of players on each team, you'll use them to balance teams dynamically. You can change these numbers for testing purposes, and to create interesting variations in the game.
- Three editable integers named
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.