Verse Library verse

01 Device

Binds and initializes custom UEFN devices like skydive volumes and HUD controllers when the island starts.

verse-library/additional-uefn-only-option/01-device.verse

# This is a simple Verse script for a skydive zone
# It shows how to use UEFN options

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

# Our main game class that holds the devices
# Devices are placed in the UEFN editor and bound here as properties
skydive_example := class(creative_device):

    # 1. A Skydive Volume device placed on the island in the editor
    @editable
    SkydiveDevice : skydive_volume_device = skydive_volume_device{}

    # 2. A second Volume device used as the custom drop-zone shape
    # Drag any volume device from the editor into this slot
    @editable
    DropZoneVolume : volume_device = volume_device{}

    # 3. A HUD Controller device placed on the island in the editor
    @editable
    HudDevice : hud_controller_device = hud_controller_device{}

    # OnBegin runs automatically when the island starts
    OnBegin<override>()<suspends> : void =
        # 4. Tell the skydive device to use our custom-shaped volume
        # The skydive_volume_device reads the bounds of DropZoneVolume
        # at runtime, giving the drop zone a non-default footprint.
        # note: SetExternalVolume is not a runtime API; wire the

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