Verse Library verse

01 Fragment

Uses Class Designer members to dynamically control a prop door for VIP access scenarios.

verse-library/getclassmembers/01-fragment.verse

# Import the necessary Fortnite devices
using { /Fortnite.com/Devices }

# Define our script
VIP_Lounge_Script := agent {
    # This is the Class Designer Device. 
    # We need to reference it so we can ask it for members.
    ClassDesigner: ClassDesignerDevice = ClassDesignerDevice{}

    # This is the Door (Prop Mover)
    Door: PropMoverDevice = PropMoverDevice{}

    # Function to check if the door should be open
    IsClubOpen := func(): bool {
        # HERE IS THE MAGIC: GetClassMembers
        # It asks the ClassDesigner: "Who is a VIP?"
        # It returns a list (array) of agents.
        vip_list := ClassDesigner.GetClassMembers()
        
        # If the list has at least one player, the club is open!
        # Think of this like checking if the guest list is empty.
        return vip_list.Count() > 0
    }

    # This event runs every frame (or tick)
    OnBegin<override>() := func(): void {
        # Start a loop that checks the club status
        loop {
            # Ask: Is anyone VIP?
            if (IsClubOpen()) {

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