VerseIsland
Feed Learn Leaderboard Guides Reference Explore Search Docs Verse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Fortnite › Player · Up to Fortnite · Player · 33 of 142 in Player
Browse Fortnite

Finding Players At Runtime In Verse

This section shows how to find players and teams at runtime that you set up earlier.

Defining Class Members

  1. Open Verse Explorer and double-click triad_infiltration_game.verse to open the script in Visual Studio Code.

  2. At the top of the file, add using { /Verse.org/Random } to access the Shuffle() function. You'll use this to randomly shuffle teams of players before balancing. Also add using { /Fortnite.com/FortPlayerUtilities } to access the Respawn() 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 }

  3. In the triad_infiltration_game class definition, add the following fields:

    1. Three editable integers named MaximumInfiltrators, MaximumAttackers, and MaximumDefenders. Initialize MaximumInfiltrators to 2 and MaximumAttackers and MaximumDefenders to 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. `triad_infiltration := class(creative_device):

      To avoid players not being able to join a team, you should set the maximum number

      of players in the island settings to the sum of all of the Maximum(Team) variables.

      Maximum number of players on the Infiltrators Team.

      @editable MaximumInfiltrators:int = 2

      Maxmimum number of players on the Attackers Team.

      @editable MaximumAttackers:int = 4

      Maximum number of players on the Defenders Team.

      @editable MaximumDefenders:int = 4`
    2. A variable map named TeamsAndTotals. This will map teams of players to the maximum number of players on that team. `# Maximum number of players on the Infiltrators Team. @editable MaximumInfiltrators:int = 2

      Maxmimum number of players on the Attackers Team.

      @editable MaximumAttackers:int = 4

      Maximum number of players on the Defenders Team.

      @editable MaximumDefenders:int = 4

      Map of teams to their maximum number of players.

      var TeamsAndTotals:[team]int = map{}`
    3. An editable array of teleporters named Teleporters. This holds a reference to the teleporters which you'll use to teleport players to their spawns after team balancing. `# Map of teams to their maximum number of players. var TeamsAndTotals:[team]int = map{}

      Array of Teleporters that teleport players to their team's spawn once the game starts.

      @editable Teleporters:[]teleporter_device = array{}`
    4. An editable item_granter_device array named WeaponGranters. This stores the item granters needed to grant players a weapon based on their team when they spawn. `# Array of Teleporters that teleport players to their team's spawn once the game starts. @editable Teleporters:[]teleporter_device = array{}

      Array of weapon granters for each team.

      @editable var WeaponGranters:[]item_granter_device = array{}`
    5. Three optional team variables named MaybeInfiltrators, MaybeAttackers, and MaybeDefenders. These store a reference to each team to allow you to check that teams are set up correctly. `# Array of weapon granters for each team. @editable var WeaponGranters:[]item_granter_device = array{}

      Reference to the infiltrators team.

      var MaybeInfiltrators:?team = false

      Reference to the attackers team.

      var MaybeAttackers:?team = false

      Rerfernece to the defenders team.

      var MaybeDefenders:?team = false`
    6. A variable array of teams named Teams. This holds a reference to all teams in the game, and you'll use this to set the optional team variables above as well as find teams to assign players to when balancing. `# Reference to the infiltrators team. var MaybeInfiltrators:?team = false

      Reference to the attackers team.

      var MaybeAttackers:?team = false

      Rerfernece to the defenders team.

      var MaybeDefenders:?team = false

      Array of all teams in the game.

      var Teams:[]team = array{}`

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 Discord — free for members Read the original at Epic Games

Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.

Comments

    Sign in to vote, comment, or suggest an edit. Sign in
    📄
    Source
    Epic Games

    © Epic Games. Official Epic developer documentation, shown here as a reference with a link to the original. All rights remain with Epic Games. Terms ↗

    View original Sources & licensing
    Request removal
    Last updated May 12, 2026
    Keep exploring
    More in Player · 33 of 142
    Prev
    team settings inventory
    Next
    triad infiltration 03 balancing teams asymmetrically in verse
    Browse all files in this folder (A–Z)
    Next up
    • 1. Open [Verse Explorer
    • Found All Three Teams
    Related topics
    • Triad Infiltration 2 Finding Players At Runtime In Verse Player
    • Triad Infiltration In Verse Verse Language
    • Triad Infiltration In Verse Verse Language
    • Triad Infiltration 01 Setting Up The Level In Verse Verse Language
    • Triad Infiltration 10 Final Result In Verse Verse Language

    Related

    Open in graph →

    Linked docs

    • Verse Explorer User Interface Reference In Unreal Editor For Fortnite

    Related topics

    • Triad Infiltration 2 Finding Players At Runtime In Verse
    • Triad Infiltration In Verse
    • Triad Infiltration In Verse
    • Triad Infiltration 01 Setting Up The Level In Verse
    VerseIsland · an archipelago of Verse & UEFN knowledge
    🗺️ Island atlas Learn Guides History About & Press Sources & Licensing Status

    Not affiliated with Epic Games. Fortnite, UEFN, Unreal Engine, and Verse are trademarks of Epic Games, Inc. Content is attributed to its source — see Sources & Licensing.

    🦜

    Scout · your island guide

    The Isle of Verse