Verse Library verse

01 Device

Wires a trigger device to a healing item to restore player health within a set radius.

verse-library/using-campfire-devices-in-fortnite-creative/01-device.verse

# This is our Campfire Controller.
# Think of this as the "Brain" of the campfire.
# It lives inside the Campfire device in the World.

# Import the necessary tools from Fortnite's toolkit.
# Think of these as the "tools in your toolbox."
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Fortnite.com/FortPlayerUtilities }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

# This is the main class for our Campfire.
# creative_device is the real base class for UEFN island devices.
# We reference a trigger_device to detect players entering the zone,
# since campfire_device does not expose a direct Verse API for zone entry.
campfire_controller := class(creative_device):

    # Wire this to a Trigger device placed at the campfire's location
    # in the UEFN editor (set its radius to match HealingRadius).
    @editable
    CampfireTrigger : trigger_device = trigger_device{}

    # Wire this to a Healing Cactus device configured to grant 50 HP.
    # Set "Grant Amount" to 50 and "Grant Type" to Health in its properties.
    @editable
    HealthGranter : healing_cactus_device = healing_cactus_device{}

    # This is a "Variable."
    # A variable is a container that can change.

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