Verse Library verse

01 Device

Wires specific trigger and prop devices together to control platform visibility with editable timers.

verse-library/create-a-platformer-with-scene-graph-in-unreal-editor-for-fortnite/01-device.verse

Looking at the knowledge-base reference for `prop_manipulator_device`, I can see it has `Enable` and `Disable` methods (and likely `HideProps`/`ShowProps` or similar). The full API snippet was cut off after `Ena...`. Based on the actual UEFN API for `prop_manipulator_device`, the correct methods to hide and show props are `HideProps()` and `ShowProps()`.

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

# This is our "Template" for the platform's brain.
# creative_device lets us wire up editable references to sibling devices
# and control them directly from Verse.
DisappearingPlatformLogic := class(creative_device):
    # This is a variable. Think of it as the platform's "Timer" setting.
    # We set it to 2.0 seconds.
    @editable
    WaitTime : float = 2.0

    # The trigger device that detects a player stepping on the platform.
    # Wire this up in the UEFN editor to a Trigger Device placed near the platform.
    @editable
    TriggerDevice : trigger_device = trigger_device{}

    # The prop manipulator device representing the platform itself.
    # Wire this up in the UEFN editor to the platform prop manipulator device.
    @editable
    PlatformProp : prop_manipulator_device = prop_manipulator_device{}

    # This is a function. It's a set of instructions.
    # It runs automatically when the game starts.
    OnBegin<override>()<suspends> : void =
        # The platform starts visible; nothing to do yet.

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