Expand player's mechanics in your LEGO® Islands with the grid placement system using the custom Verse LEGO Grid device. With the system, players can place props into your LEGO Island. This grid placement system tracks where players can and can't place props in your world. It includes a user interface (UI) for players to select props.
Build an inventory of assets for players to access through various gameplay, like events and achievements. Expand your asset inventory with brick designs using the Brick Editor.
This guide steps you through creating a grid system for placing props as showcased in the Bloom Tycoon template.
Tie this into your existing tycoon island for players to place the props they unlock.
Layout levels and design them.
Incorporate LEGO props from the asset inventory.
To build your own prop placement system you must use a combination of LEGO Bloom Tycoon's custom Verse classes and some existing Fortnite devices to mimic the functionality.
You can create a new level in the template to build off of, and then remove the template levels when doing an optimization pass before publishing.
Migrate Assets from Bloom Tycoon
If you aren’t working within the template, you can copy the following folders from the template into your existing project. UEFN has a Migrate tool to copy assets into a project, including any dependencies.
To migrate the assets:
In the Content Drawer, navigate to your project folder and Shift + Click the following folders.
LEGO_Grid_Placement
LEGOQuests
LEGOUtilities
Props
UI
Right-click the folders and select Migrate.
Select the project location to move the assets to. You must place the assets in the project folder.
The primary devices and utilities for creating the grid system are located in the LEGO_Grid_Placement and LEGOUtilities folders. You can follow along for the general creation of the grid placement system.
Grid System Setup
You can create the grid system in your LEGO Island using Unreal Editor for Fortnite (UEFN).
To set up the grid system:
Open or create a LEGO Island in UEFN.
Open the Content Drawer, and navigate to Project Folder> LEGO_Grid_Placement.
If you copied the files from the template, then navigate to where you placed the folders.
Drag the
lego_grid_deviceVerse class into your level.
You should see the device in your island and options in the Details panel. You’ll learn more about these settings in the sections to come.
Alternatively, you can create a new Verse device and copy over the following snippet.
using { /Fortnite.com/Characters }
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Colors/NamedColors }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Simulation/Tags }
using { /Fortnite.com/UI }
using { LEGOUtilities }
The Verse snippet is dependent on the utilities found in the LEGOUtilities folder. You must have these in your project folder.
Conditional to Place Objects
Playing through the first level, you used the Patchwork tool to place objects in the world. This tool satisfies a conditional check in the LEGO Grid device that looks for the specified tool to be equipped in order to activate the system.
To create the connection use the Conditional Button device. The Conditional Button device connects to the Button_GridToggle option to toggle the grid on and off when a player has a specific item.
To create the conditional:
From the Content Drawer, navigate to the Fortnite folder, and search for Conditional Button.
Drag the device into the level and navigate to the Details panel.
Disable the Visible in Game option.
Under User Options > Key Item 1, click the Item Definition dropdown and search for Patchwork Tool. The tool you select is the conditional item players must equip to activate the grid.
From Fortnite > Devices drag an Item Spawner into the level.
Place it near where your player will be spawning in.
In the Spawn on a Timer section, set the time to 0.
Add an element to the items array and set that element to be the patchwork tool.
Select the Grid placement device and set the conditional field to the conditional button you just configured.
Trigger Assignment
To provide a range of utility like rotating props, you must set up the Input Devices in the Details panel. To create the connection, the template uses Input Trigger devices.
The Input Trigger device activates an event when players press or release a particular control input. This device connects to the remaining trigger options for adjusting the prop when the grid is active.
To get started assigning triggers to the device:
In the Content Drawer, navigate to the Fortnite folder, and search for Input Trigger.
Drag 8 input triggers into the level.
For each trigger use the table below to repeat the steps of setting the following in the Details panel:
The device name. To rename the device, click the device name and use F2.
The Input Type.
The Creative Input.
The HUD Description.
Trigger | Name | Input Type | Creative Input | HUD Description |
1 | InputTrigger_Place | Creative Input Action | Custom 1 (Fire) | Place |
2 | InputTrigger_Delete | Creative Input Action | Custom 2 (Target) | Delete |
3 | InputTrigger_Previous | Creative Input Action | Custom 15 (Squad Requests) | Previous Object |
4 | InputTrigger_Next | Creative Input Action | Custom 13 (Place Marker) | Next Object |
5 | InputTrigger_RotateCounterClock | Creative Input Action | Custom 6 (Interact) | Rotate Counter Clockwise |
6 | InputTrigger_RotateClockwise | Creative Input Action | Custom 11 (Swap Quickbar) | Rotate Clock |
7 | InputTrigger_SwitchTargeting | Creative Input Action | Custom 13 (Place Marker) | Switch Targeting |
8 | InputTrigger_OpenUI | Creative Input Action | Custom 14 (Toggle Inventory) | Open UI |
With the devices configured, you can connect them to the respective Input Devices fields to create the inputs for using the grid.
It is good practice to rename devices to help with searchability connecting them to option fields.
User Interface
Add visuals and messages to players' heads up display (HUD) with user interface (UI) elements. You can create the UI that the system uses to give your players visual feedback on whether or not they can place objects.
The device uses world-space elements that are provided in the Props folder. However, you can create your own props for a custom UI.
You don’t need to add these to the level, just assign them in the LEGO Grid device.
The template uses the following key elements:
A green box appears when an object is ok to place at the location.
A preview of the prop, which appears inside that green box.
A red box that informs the player that they cannot place the selected object in the area.
A red X that displays when the user tries to place an object in an area that is not allowed.
To configure this behavior do the following:
From the Content Drawer, navigate to All > Fortnite > Devices > UI drag a HUD Message device into the level.
Click your grid placement device and navigate to the User Interface category of the Details panel.
Click the MessageDevice_EntitySelect dropdown and search for the HUD Message device you placed. The connected device will show the name of the current prop selection.
Set the following to create the visual message of prop placement:
Assign the PreviewBox_Plot_White field to the PreviewBox_Plot_White prop.
Assign the PreviewBox_Object_Green field to the PreviewBox_Object_Green prop.
Assign the PreviewBox_Object_Red field to the PreviewBox_object_Red prop.
Assign the PreviewCross field to the Preview Cross prop.
Next
With your input mapping and UI created, it's time to configure the Grid Entity Manager device with props.