1.  ![Epic Games](https://edc-cdn.net/assets/images/logo-epic.svg)[Developer](/)
2.  [Documentation](/documentation/ "Documentation")
3.  Fortnite
    *   [Unreal Engine](/documentation/en-us/unreal-engine)
    *   [Fortnite](/documentation/en-us/fortnite)
    *   [MetaHuman](/documentation/en-us/metahuman)
    *   [Twinmotion](/documentation/en-us/twinmotion)
    *   [RealityScan Mobile](/documentation/en-us/realityscan-mobile)
    *   [Fab](/documentation/en-us/fab)
4.  [Fortnite Documentation](/documentation/en-us/fortnite/fortnite-documentation "Fortnite Documentation")
5.  [Game Collections](/documentation/en-us/fortnite/game-collections-in-fortnite "Game Collections")
6.  [LEGO® Islands](/documentation/en-us/fortnite/building-lego-islands-in-fortnite "LEGO® Islands")
7.  Action Adventure Template

Action Adventure Template
=========================

Become a hero as you take on quests, solve puzzles, and defeat enemies in the LEGO Action Adventure template.

![Action Adventure Template](https://uefn-docs.yuzulabs.dev/community/api/documentation/image/38dffc38-06dc-45f8-bffa-7afb238a6281?resizing_type=fill&width=1920&height=335)

On this page

The LEGO® Action Adventure Template provides the building blocks for a classic action-adventure gameplay complete with quests, combat, and puzzles. Most of all, this template showcases the [LEGO® Assembly Devices](https://uefn-docs.yuzulabs.dev/documentation/en-us/fortnite/using-lego-assembly-devices-in-fortnite-creative) device so you can prove to the world that you're a certified LEGO professional builder. Lock into this experience while enjoying its relaxing vibes and soothing sounds.

In this gameplay, there is one universe - but many worlds to save and many hats to wear. Become a Warrior, Blaster, or Thief, and unlock quests that utilize unique tools as you change your play style for each class persona. With each class, carry out your heroic duty to save the universe as you combat pesky enemies.

In the land of LEGO, it pays to be a hero. Your actions can award studs which you can use to assemble props that unlock new areas, fulfill quest requirements, and unlock in-game trophies. As you progress through each class, you will encounter rewarding trials that keep you on your toes as you navigate through obstacles.

[![](https://uefn-docs.yuzulabs.dev/community/api/documentation/image/6f5d3ac4-2927-43be-8152-db15de757817?resizing_type=fit)](https://uefn-docs.yuzulabs.dev/community/api/documentation/image/6f5d3ac4-2927-43be-8152-db15de757817?resizing_type=fit)

At the end of each class quest, you will find that the banana has gone bad! It's up to you to boss battle the rogue Peely Bone NPC in a Verse-based attack system. You will encounter this battle with each class as you change your fighting style to match your weapon. 

When it's all over, finish the gameplay with a tutorial alongside the following walkthrough, and save your universe by learning the mechanics to recreate this experience. Good luck on your adventure, hero!

Access the LEGO Action Adventure Template
-----------------------------------------

Follow the steps below to access this template within UEFN.

1.  Within the **Project Browser**, navigate to **Brand Templates**, then use the **All Brands** dropdown to select **LEGO® Island**.
    
2.  Select **LEGO Action Adventure Template**. Then under **Project Name**, type your project's name.
    
3.  Under **Project Defaults**, set if your project will be under **Unreal Revision Control** and set the **Team Selection**.
    
4.  Click **Create** to load your project.
    

Create a Custom Quest
---------------------

The Action Adventure template offers many quests that give players a sense of purpose throughout the gameplay. These quests are tracked individually through persistent data.

Launch a session so that you can test your quest as you create it.

You can create a Verse device to set up quests within your game and grant items such as **[LEGO® Collectible](https://uefn-docs.yuzulabs.dev/documentation/en-us/fortnite/using-lego-collectible-devices-in-fortnite-creative)** studs as rewards for players. You can also use this quest system to progress the story of your gameplay. 

Through events such as **Quest Started**, **Quest Aborted**, and **Quest Completed**, you can make items appear when the quests start.

To create a quest system, follow the steps below. 

1.  In the Viewport toolbar, [create a Verse device](https://uefn-docs.yuzulabs.dev/documentation/en-us/fortnite/create-your-own-device-using-verse-in-unreal-editor-for-fortnite) named **LEGO\_quest\_giver**, and drag it into your project.
    
2.    Then, drag two Button devices into your project.
    
    1.    Name one as **button\_quest\_giver** and the other as **button\_quest**.  
        
3.  Add the following Verse code to your project.
    
    Verse
    
        
        
        using { /Fortnite.com/Characters }
        using { /Fortnite.com/Devices }
        using { /Verse.org/Simulation }
        using { /UnrealEngine.com/Temporary/Diagnostics }
        
        # ====================================================================================================================================
        # LEGO quest giver device that manages a linear quest system
        # ====================================================================================================================================
        
    
    Expand codeCopy full snippet(212 lines long)
    
4.  From the **Content Browser**, navigate to **Fortnite** > **Devices** \> **Logic**, and drag two **Tracker** devices into your project.
    
    1.  Name one as **tracker\_main\_quest** and the other as **tracker\_quest\_giver**.
        
5.  Place the button\_quest button device in a visible location near your NPC so players can activate the quest.
    
6.  Place the button\_quest\_giver button device inside the hologram of the NPC so that it is hidden.
    
7.   From the **Content Browser**, navigate to **Fortnite** \> **Devices** \> **!Beta**, and drag an [NPC Spawner](https://uefn-docs.yuzulabs.dev/documentation/en-us/fortnite/using-npc-spawner-devices-in-unreal-editor-for-fortnite) device into your project.  
    

### Configure the Quest Device

Next, configure the LEGO\_quest\_giver device, and link your devices to set up your first quest system. To do so, follow the steps below.

1.  In your project or in the **Outliner** panel, select the LEGO\_quest\_giver device.
    
2.  In the **Details** panel of the device, navigate to **QuestGiverName**, and set the quest-giving name of the NPC.
    
3.  Next, navigate to **Button\_Interact**, and set the option to **button\_quest\_giver**.
    
4.  Navigate to **TrackerDevice**, and set the option to **tracker\_quest\_giver**.
    

The quest system is set up as an array of either **lego\_quest** or **lego\_quest\_repeatable**. A LEGO quest is a single quest system that players can progress through in any order. 

### Create Repeatable Quests

For repeatable quests, you can even create a mechanic that requires constant stud pickups or set enemies that can be defeated multiple times.

1.  In the **Details** panel of the LEGO\_quest\_giver device, select the **\+** icon for **Quests** to add an array element to the quest.
    
2.  Make sure the array is set to **LEGO\_quest**, then navigate to **Name**, and type the name of the quest.
    
3.  Expand the **Display Text** array, and set the text for dialogue.
    
4.  Under the **Quest** array, navigate to **TrackerDevice**, and set the option to **tracker\_main\_quest**.
    

Your players will not be able to accept new quests unless you set your quest to be repeatable. You can also configure a **[Trigger](https://uefn-docs.yuzulabs.dev/documentation/en-us/fortnite/using-trigger-devices-in-fortnite-creative)** device to reset the progression of the quest.

### Reset Quests

To set your quests to reset, follow the steps below. 

1.  From the **Content** Browser, navigate to **Fortnite** \> **Devices** \> **Logic**, and drag a Trigger device into the project.
    
2.  In the **Outliner** panel, select the LEGO\_quest\_giver device.
    
3.  Then, in the **Details** panel, click the **Trigger\_ResetProgress** dropdown, then select the Trigger device.
    

In the **Outliner** panel, navigate to **Demo Area** > **DemoDisplay\_Quest** to view the preconfigured demo quest.

### Configure the Trackers

You can use the Tracker device to increment, decrement, and complete your LEGO quests. Each quest should have its own Tracker device assigned to manage its progression. 

To create a basic, non-repeatable quest, follow the steps below.

1.  In the **Outliner** panel, select the tracker\_main\_quest Tracker device.
    
2.  In the **Details** panel, set **Stat to Track** to **Events**.
    
3.  Set **TargetValue** to **1** to make sure the starting value is zero. This value is incremented every time a quest step is completed. For more quest steps, increase the value so the completion events continue to increment the tracker.
    
4.  Set **Amount to Change** to **1**.
    
5.  Navigate to **IncrementProgress**, then set the array to **ButtonQuest** and the event to **OnInteract**. You can set multiple events as quest requirements to increment this, similar to the quests created in the Action Adventure Template. For example, you can set quest requirements such as entering the world, opening a secret door, or defeating a boss.
    
6.  In the **Outliner** panel, select the tracker\_quest\_giver Tracker device. Then, in the **Details** panel, set **Assign on Start** to **False**.
    

### Configure the NPC Spawners

You can use the NPC Spawner device to spawn a **Guard** character type, which has the behavior of patrolling and engaging players in combat. 

To use a custom Verse NPC character definition with the NPC Spawner device, follow the steps below. 

1.  From the content folder of your project, create a [Character Definition](https://uefn-docs.yuzulabs.dev/documentation/en-us/fortnite/using-npc-character-definitions-in-unreal-editor-for-fortnite) blueprint named **NPCDef\_QuestGiver**.
    
2.  In the **Details** panel of the Character Definition, change the settings to match the table below.
    
    **Option**
    
    **Value**
    
    **Explanation**
    
    **Type**
    
    Guard
    
    Defines what type of AI character will be spawned by this SpawnDefinition.
    
    **Selected AI**
    
    NanaSplit
    
    Chooses an AI character to spawn from this preset.
    
    **Behavior**
    
    Verse Behavior
    
    Defines how the spawned AI character will behave once spawned.
    
    **NPCBehaviorScript**
    
    npc\_behavior\_quest\_giver
    
    Select a Verse script of the type npc\_behavior to control the spawned NPC
    
    **Accuracy**
    
    Moderate
    
    Determines how accurate Guards are at shooting.
    
    **Can be Down But Not Out**
    
    False
    
    The NPC will not enter the Down But Not Out state.
    
    **Modifiers - Index \[0\]**
    
    Team Modifier
    
    Sets the modifier to apply.
    
    **Team Option**
    
    Index
    
    Sets the team type.
    
    **Team Index**
    
    1
    
    Sets the team type's number.
    
3.  In the **Outliner** panel, select the NPC Spawner device.
    
4.  In the **Details** panel, set the NPC Character Definition to **NPCDef\_QuestGiver**.
    

Award LEGO® Studs
-----------------

Reward players throughout their gameplay by awarding LEGO® Collectible studs for their actions and by defeating enemies. You can either manually place studs or use Verse to set them to randomly spawn throughout your environment so users can get them by eliminating NPCs, destroying props, and completing assembly minigames. 

In the Action Adventure template, players are awarded studs that players can use to proceed through the story and purchase in-game trophies. Use the Collectible device to create studs for players to collect.

You can use an object pool to efficiently grant studs throughout your gameplay. Object pools are useful for spawning large amounts of objects. 

Instead of constantly creating and destroying studs, you can pre-create them before the game begins and then spawn them as needed. With pre-created objects, you can activate them in their set positions to be released. Pre-initializing resources like studs can help reduce performance costs tied to memory reallocation.

This template uses **[Item Spawner](https://uefn-docs.yuzulabs.dev/documentation/en-us/fortnite/using-item-spawner-devices-in-fortnite-creative)** devices alongside the **LEGO\_stud\_spawner\_pool** Verse device to specify a location and number of studs to spawn with the SpawnStudsAtLocation() function. This teleports the required number of Item Spawner devices to the location that spawns studs. Once the Item Spawner device has spawned studs at that location, it’s re-added to the pool and can be reused. 

You can add Item Spawner devices to the level, and then give them an associated pool tag, so they will be aggregated and spawned when and where you want them to.

### Create an Object Pool

To create an object pool to spawn studs, follow the steps below.

1.  In the **Verse Explorer** panel, create a Verse device named **LEGO\_stud\_pool** and drag it into your project.
    
2.  Add the following Verse code to your project.
    
    Verse
    
        
        using { /Fortnite.com/Devices }
        using { /Verse.org/Colors }
        using { /Verse.org/Simulation }
        using { /Verse.org/Simulation/Tags }
        using { /UnrealEngine.com/Assets }
        using { /UnrealEngine.com/Temporary/Diagnostics }
        using { /UnrealEngine.com/Temporary/SpatialMath }
        
        # ============================================================================================================================================
        
    
    Expand codeCopy full snippet(110 lines long)
    
3.  In the **Details** panel, click **+Add**, and select **Verse Tag Markup**.
    
4.  In the **Tags** dropdown, expand the array, and select **LEGO\_stud\_pool\_tag**.
    

### Add the Item Spawners

Each Item Spawner device can only spawn a single stud collectible. Therefore, you must have as many Item Spawner devices in the pool as the amount of studs you’d like to spawn. Follow the steps below to set up Item Spawner devices.

1.  From the **Content** Browser, navigate to **Fortnite** \> **Devices** \> **Items**, and drag an Item Spawner device into your project.
    
2.  In the **Details** panel, add an array to **Item List** and set it to to **CP\_Ingredient\_GoldStu****d**.
    
3.  Navigate to **Initial Movement of Item**, and set the option to **Toss** for the bounce effect when collected.
    
4.  Add a **Verse Tag Markup**, and set it to **lego\_stud\_itemspawner\_tag**.
    
5.  Copy and paste this device as many times as needed to have your desired number of Item Spawners in your pool.
    

### Use the Pool to Spawn Studs

You can use the Item Spawners from above to spawn studs in your gameplay. This means you can respond to multiple gameplay events only using regular devices. 

For example, you can spawn studs when an NPC is eliminated, an Assembly device requirement is met, or even when a quest has been completed. 

To spawn pools of studs in your gameplay as a reward when the quest is completed, follow the steps below.

1.  In the **Outliner** panel, select the **LEGO Quest Giver** device you created earlier.
    
2.  Navigate to and expand your **Quests** array, and find the **Reward** section. Then, check to see if it is set to **lego\_stud\_spawner**.
    
3.  Under Amount, set the amount of studs you would like to award players. Since the Item Spawner device can only spawn one item, you'll need an Item Spawner device for each award amount. So if your reward is 15, you’ll need 15 Item Spawners devices to spawn these simultaneously.
    
4.  Set the **SpawnType** to **Toss** to match the **Verse Markup Tag** on your Item Spawner devices.
    
5.  You can launch a session to test if spawning works.
    

Create a Verse-based Attack System
----------------------------------

No adventure is complete without a boss battle! Challenge your players with tough NPC enemies that players must use strategy to defeat.

In this template, NPCs use area-of-effect (AOE) attacks that teleport an **[Explosive](https://uefn-docs.yuzulabs.dev/documentation/en-us/fortnite/using-explosive-devices-in-fortnite-creative)** device to players and stun attacks that put players into temporary stasis. 

Within the battle arena, players can expect class-based fight enhancements and various powerups to aid them in battle.

You can alter the **npc attack controller** Verse device to control how often and what attacks the NPCs use. 

Insert the code below into your own projects to create your own variation of the NPC boss battle.

Verse

    using { /Fortnite.com/Characters }
    using { /Fortnite.com/Devices }
    using { /Verse.org }
    using { /Verse.org/Assets }
    using { /Verse.org/Colors }
    using { /Verse.org/Random }
    using { /Verse.org/Simulation }
    using { /UnrealEngine.com/Assets }
    using { /UnrealEngine.com/Temporary/Diagnostics }
    using { /UnrealEngine.com/Temporary/SpatialMath }
    

Expand codeCopy full snippet(105 lines long)

Design your Island
------------------

Below are a few tips to snap the bricks of your amazing gameplay experience together.

1.  Go the extra mile in your project by creating a custom UI to keep your players entertained. This template uses player portraits and heart health bars to deviate from the normal UI design.
    
    [![](https://uefn-docs.yuzulabs.dev/community/api/documentation/image/dd72edbd-fed0-4a37-adfd-d35709f3846a?resizing_type=fit)](https://uefn-docs.yuzulabs.dev/community/api/documentation/image/dd72edbd-fed0-4a37-adfd-d35709f3846a?resizing_type=fit)
    
2.  Don't let your players get lost! Strategically place LEGO ® Collectible studs to guide players along a desired path.
    
3.  As your puzzles increase in difficulty, be sure to offer HUD hints and text suggestions to lead your players the right way.
    
    [![](https://uefn-docs.yuzulabs.dev/community/api/documentation/image/fdd5a506-b45d-4888-a0c1-18aa5ff5fa5c?resizing_type=fit)](https://uefn-docs.yuzulabs.dev/community/api/documentation/image/fdd5a506-b45d-4888-a0c1-18aa5ff5fa5c?resizing_type=fit)
    
4.  Use the Assembly device to unblock hidden areas. You can also combine the device with cinematic sequences and even the **[Prop Mover](https://uefn-docs.yuzulabs.dev/documentation/en-us/fortnite/using-prop-mover-devices-in-fortnite-creative)** device to bring assembly builds to life.
    
5.  Be sure to check out the entire Verse code used to make this gameplay by clicking **Verse** in the UEFN toolbar.
    

*   [template](https://uefn-docs.yuzulabs.dev/community/search?query=template)
*   [collectible](https://uefn-docs.yuzulabs.dev/community/search?query=collectible)
*   [lego](https://uefn-docs.yuzulabs.dev/community/search?query=lego)

* * *

Ask questions and help your peers [Developer Forums](https://forums.unrealengine.com/categories?tag=fortnite)

Write your own tutorials or read those from others [Learning Library](https://uefn-docs.yuzulabs.dev/community/fortnite/learning)

On this page

*   [Access the LEGO Action Adventure Template](/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite#accessthelegoactionadventuretemplate)
*   [Create a Custom Quest](/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite#createacustomquest)
*   [Configure the Quest Device](/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite#configurethequestdevice)
*   [Create Repeatable Quests](/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite#createrepeatablequests)
*   [Reset Quests](/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite#resetquests)
*   [Configure the Trackers](/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite#configurethetrackers)
*   [Configure the NPC Spawners](/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite#configurethenpcspawners)
*   [Award LEGO® Studs](/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite#awardlego%C2%AEstuds)
*   [Create an Object Pool](/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite#createanobjectpool)
*   [Add the Item Spawners](/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite#addtheitemspawners)
*   [Use the Pool to Spawn Studs](/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite#usethepooltospawnstuds)
*   [Create a Verse-based Attack System](/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite#createaverse-basedattacksystem)
*   [Design your Island](/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite#designyourisland)