Verse Library verse

01 Standalone

Manages a list of placeable props for grid-based building mechanics.

verse-library/creating-a-lego-grid-placement-system-in-unreal-editor-for-fortnite/01-standalone.verse

# This is our main script for the LEGO Grid
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

# We create a new device called BrickBox
# This device will hold our list of props
BrickBox := class(global) (VerseDevice):

    # This is a list of things players can place
    # We call these "Grid Entities"
    GridEntities := []GridEntity

    # When the game starts, we add our first prop
    OnBegin<override>()<suspends>:void=
        # Add a simple tree prop to the list
        # Replace "Tree" with your actual prop name
        GridEntities := Append(GridEntities, Tree)

    # This function lets the game know
    # which props are available
    GetAvailableProps<override>()<override>:[]GridEntity=
        return GridEntities

Comments

    Sign in to vote, comment, or suggest an edit. Sign in