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 · 36 of 142 in Player
Browse Fortnite

Balancing Players in Triad Infiltration

When a new player joins the game, they need to be balanced asymmetrically onto the right team. If that team happens to be the Infiltrators, they also need to have an instance of OnInfiltratorDamaged() associated with them.

Follow the steps below to learn how to balance players to the correct team when they join the game in progress.

Setting Up Player Join Functions

  1. Add a new function, OnInfiltratorJoined() , to the invisibility_manager class definition. This function takes an agent and spawns an instance of OnInfiltratorDamaged() with the given agent. Add the <public> specifier to this function, since you'll be calling it from triad_infiltration_game. # Spawns an OnInfiltratorDamaged function when a new infiltrator joins the game OnInfiltratorJoined<public>(InAgent:agent):void= spawn{OnInfiltratorDamaged(InAgent)}
  2. Add a new function OnPlayerAdded() to the triad_infiltration_game class definition. This function takes a player, balances them to the correct team, and calls OnInfiltratorJoined() if the new player is an Infiltrator. # Handles a new player joining the game. OnPlayerAdded(InPlayer:player):void=
  3. Get the fort_team_collection for the current playspace and save it in a variable FortTeamCollection. # Handles a new player joining the game. OnPlayerAdded(InPlayer:player):void= Logger.Print("A new Player joined, assigning them to a team") FortTeamCollection := GetPlayspace().GetTeamCollection() Refactoring Team Balancing
  4. You need to balance the new player onto the correct team, but if you call BalanceTeams() you'll end up rearranging every player onto a new team. Instead of rewriting the code for finding the smallest team for the new player and balancing them onto it, this is a good opportunity for refactoring.

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 · 36 of 142
    Prev
    triad infiltration 06 blinking player visibility on damage in verse
    Next
    triad infiltration 08 visualizing players holding objectives in verse
    Browse all files in this folder (A–Z)
    Next up
    • In the [next step
    Related topics
    • Triad Infiltration In Verse Verse Language
    • Triad Infiltration 02 Finding Players At Runtime In Verse Player
    • Triad Infiltration Making Players Invisible In Verse Player
    • Triad Infiltration 03 Balancing Teams Asymmetrically In Verse Player
    • Triad Infiltration 04 Granting Weapons On Player Spawn In Verse Weapons

    Related

    Open in graph →

    Related topics

    • Triad Infiltration In Verse
    • Triad Infiltration 02 Finding Players At Runtime In Verse
    • Triad Infiltration Making Players Invisible In Verse
    • Triad Infiltration 03 Balancing Teams Asymmetrically In Verse
    • Triad Infiltration 04 Granting Weapons On Player Spawn 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