Verse Library verse

01 Device

Creates a custom device class that heals players on trigger, tracks usage, and relocates to a new teleporter location after each use.

verse-library/escape-health-powerup/01-device.verse

# This is a Verse Script. It runs on the server to manage game logic.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Game }

health_station_manager := class(creative_device):

    # 1. DEFINE THE DEVICES (The Scene Graph)
    # We need to tell the script which devices we are controlling.
    # In UEFN, these are your Trigger Volume and your Teleporter devices.

    # The Trigger: Detects when a player steps on it.
    @editable
    TriggerDevice : trigger_device = trigger_device{}

    # The Healer: A health powerup device that grants health on Activate.
    # Place a health_powerup_device in the level and wire it here.
    @editable
    HealerDevice : health_powerup_device = health_powerup_device{}

    # The Teleporter: Moves the health station prop to a new location.
    # We use a teleporter_device to reposition the pickup each use.
    # Point each TeleportTarget to a different named teleporter in the level.
    @editable
    TeleportTargets : []teleporter_device = array{}

    # 2. DEFINE VARIABLES (The Sticky Notes)

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