Verse Library verse

01 Fragment

Uses player reference devices and trigger volumes to automatically open doors for authorized VIP players.

verse-library/reference/01-fragment.verse

# We are creating a script that controls a VIP door.

# Import the necessary Verse libraries for devices and players.
using /Fortnite.com/Devices
using /Verse.org/Sim

# Define our main script object.
# This is the "container" for all our logic.
script class VIP_Door_Controller is SimObject {

    # ---------------------------------------------------------
    # 1. THE REFERENCES (The ID Card Holders)
    # ---------------------------------------------------------
    
    # This is a variable that will hold the "ID" of our VIP player.
    # @editable means you can see this in the UEFN sidebar.
    # player_reference_device is the TYPE of data we are storing.
    @editable
    VIP_Reference: player_reference_device = player_reference_device{}

    # This is the Prop Mover (the door) we want to control.
    @editable
    Door_Prop_Mover: prop_mover_device = prop_mover_device{}

    # This is the button/trigger the player steps on.
    @editable
    Button_Trigger: trigger_volume_device = trigger_volume_device{}

    # ---------------------------------------------------------
    # 2. THE SETUP (When the game starts)

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