Verse Library verse

01 Device

Waits for a button press to trigger a loot crate via a connected prop mover device.

verse-library/wait-5-seconds/01-device.verse

# We need access to the Simulation library to use Sleep, 
# and World to spawn our loot.
using { /Verse.org/Simulation }
using { /Verse.org/Native }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Devices }

# This is our "Loot Goblin" component.
# It attaches to a Button device and waits to spawn a crate.
#
# HOW TO SET UP IN UEFN:
#   1. Place a button_device in your level.
#   2. Place a prop_mover_device in your level; set its
#      initial state so the crate is hidden off to the side.
#   3. Select the button_device, click Add -> New Verse Component,
#      and choose this file.
#   4. In the component's Details panel, drag your prop_mover_device
#      into the TargetProp slot.

loot_goblin_component := class(creative_device):

    # Editable reference: drag your PropMover into this slot
    # in the UEFN Details panel.
    @editable
    TargetProp : prop_mover_device = prop_mover_device{}

    # Editable reference: drag your Button device into this slot.
    @editable
    LootButton : button_device = button_device{}

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