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

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 documentation

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

Guided course

Add this to your free study plan — we’ll suggest related material and stitch it into one compile-checked lesson.

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)

Source

Epic Games documentation

View original

Last updated 2026-05-12T22:19:56.465967+00:00

VerseIsland· an archipelago of Verse & UEFN knowledge
🗺️ Island atlasLearnGuidesHistoryAbout & PressSources & LicensingPrivacy PolicyTermsStatus

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