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

Subscribing to Player Events in Verse

This step shows how to assign a weapon to a player at the start of the game.

When a player spawns for the first time, grant them the first weapon in the WeaponGranters array. To do this, you’ll need to subscribe functions to each player spawn pad. See the Coding Device Interactions page for more details on subscribable events.

Follow these steps to subscribe to player spawn events and to assign their first weapon.

  1. Add a new method OnPlayerSpawn() to the team_elimination_game class. This method makes sure that you assign the player the right weapon when they spawn for the first time, and when they respawn.

    Verse

    |  |  |
    | --- | --- |
    |  | OnPlayerSpawn(InPlayer : agent) : void = |
    |  | Print("A Player just spawned!") |
    

    OnPlayerSpawn(InPlayer : agent) : void = Print("A Player just spawned!")

    Copy full snippet(2 lines long)

  2. To subscribe the functions you just set up to their associated events, you need to add new code to OnBegin(). Create a for loop to subscribe to each player spawner’s SpawnedEvent using OnPlayerSpawn.

    Verse

    |  |  |
    | --- | --- |
    |  | OnBegin<override>()<suspends> : void = |
    |  | # Get all the players |
    |  | set Teams = GetPlayspace().GetTeamCollection().GetTeams() |
    |  | set EliminationsToEndGame = WeaponGranters.Length |
    |  | Print("Number of eliminations to end game is {EliminationsToEndGame}") |
    |  | for (Spawner : PlayerSpawners): |
    |  | Spawner.SpawnedEvent.Subscribe(OnPlayerSpawn) # Subscribe to each player spawn pad |
    

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 Feb 11, 2026
    Keep exploring
    More in Player · 27 of 142
    Prev
    team elimination 1 setting up the level in verse
    Next
    team elimination 4 tracking players using maps in verse
    Browse all files in this folder (A–Z)
    Next up
    • This step shows how to assign a weapon to a player at the start of the game.
    • Granting the First Weapon
    Related topics
    • Team Elimination 6 Handling A Player Joining A Game In Progress In Verse Player
    • Team Elimination Game 3 Subscribing To Player Spawn Events In Verse Spawning
    • Team Elimination 2 Finding Devices At Runtime In Verse Devices
    • Team Elimination Game In Verse Player
    • Team Elimination Game 7 Testing Multiplayer Using The Sentry Device In Verse Devices

    Related

    Open in graph →

    Linked docs

    • Coding Device Interactions In Verse

    Related topics

    • Team Elimination 6 Handling A Player Joining A Game In Progress In Verse
    • Team Elimination Game 3 Subscribing To Player Spawn Events In Verse
    • Team Elimination 2 Finding Devices At Runtime In Verse
    • Team Elimination Game 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