Verse Library verse

01 Device

Enables team player spawners and an item granter to initialize a basic arena match.

verse-library/set-up-the-play-area/01-device.verse

# This is a simple Verse script for setting up a play area.
# It uses basic devices you can find in UEFN.
# note: In UEFN/Verse, devices (player_spawner, item_granter) are placed
# in the editor and referenced via @editable fields — Verse cannot
# spawn or position devices at runtime. This script shows how you wire
# up and configure those pre-placed devices in code.

using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

# Attach this class to a Verse Device actor in the UEFN editor.
arena_manager := class(creative_device):

    # Drag your two pre-placed player_spawner devices here in the editor.
    @editable
    RedSpawner : player_spawner_device = player_spawner_device{}

    @editable
    BlueSpawner : player_spawner_device = player_spawner_device{}

    # Drag your pre-placed item_granter device here in the editor.
    @editable
    ItemGranter : item_granter_device = item_granter_device{}

    # OnBegin runs automatically when the game session starts.
    OnBegin<override>()<suspends> : void =
        Create_Arena()

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