Verse Library verse

01 Device

Initializes team assignments and grants starter weapons to players when the match begins.

verse-library/triad-infiltration-01-setting-up-the-level-in-verse/01-device.verse

using { /Fortnite.com/Devices }
using { /Fortnite.com/Teams }
using { /UnrealEngine.com/Temporary/Symbols }

# This is our main script. It runs when the game starts.
TriadSetupDevice := class(creative_device):

    # CONSTANTS: The "Loot Pool" of our setup.
    # These are fixed. We point Verse to the specific devices we placed in the editor.
    # Think of these as the "names" of the desks in our office building.
    Red_Spawn_Pad := spawn_pad
    Blue_Spawn_Pad := spawn_pad
    Green_Spawn_Pad := spawn_pad

    Red_Team_Setting := team_settings
    Blue_Team_Setting := team_settings
    Green_Team_Setting := team_settings

    Red_Gun_Grant := item_granter
    Blue_Gun_Grant := item_granter
    Green_Gun_Grant := item_granter

    # This function runs once when the match begins.
    OnBegin<override>()<suspends>: void =
        # 1. Assign Players to Teams
        # We tell each Team Setting device to "take control" of players.
        # This is like the bus dropping players into specific departments.
        Red_Team_Setting.SetTeamForPlayer()
        Blue_Team_Setting.SetTeamForPlayer()
        Green_Team_Setting.SetTeamForPlayer()

Sign in free to read the full source 🌴

This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.

Sign in with Discord

Comments

    Sign in to vote, comment, or suggest an edit. Sign in