Build a Mystery Escape Game in UE5

Build a first-person escape game with Blueprints, triggers, and a win condition.

Introduction

30 Second Summary

Escape rooms are one of the most popular group activities in the world. What if you could build your own digital escape room from scratch, complete with a mystery storyline and a puzzle mechanic?

In this project, you will build a first-person mystery escape game called "Project Echo" using Unreal Engine 5. You'll create rooms to explore, trigger story text that appears on screen, hide a keycard for the player to find, and build a locked door that only opens when the player has the key.

What You'll Build

When you hit Play, you'll walk through a dim research facility as story text fades onto screen, spot a glowing keycard on a desk, pick it up, approach the locked exit door, and watch it open to reveal a victory screen.

By the end of this project, you'll have:

  • A two-room research facility built from scratch using UE5 Geometry Brushes that you can walk through in first person.
  • A story trigger system that displays narrative text on screen as you explore different areas of the facility.
  • A keycard pickup mechanic and a locked door that checks whether you have the key before letting you escape.
  • Secret Mission: A hidden third room with an alternate story clue that rewards curious players who explore beyond the main path.

Are there any prerequisites?

You need Unreal Engine 5 installed on your Windows PC via the Epic Games Launcher. No prior game development experience is required.

Before We Start

Before we dive in, let's lock in what you're about to build and why it matters.

You're creating a first-person mystery escape game called Project Echo. Two connected rooms, story text that appears as you explore, a keycard to find, and a locked door to escape through.

Set Up the Project and Build Your Facility

Before any mystery can unfold, you need a physical space for it to happen in. Your escape game needs rooms the player can walk through, explore, and eventually escape from.

In this step, you'll create a new Unreal Engine 5 project with a ready-made first-person character. Then you'll build two connected rooms from scratch using Geometry Brushes to form the research facility where your story takes place.

In this step, get ready to:
  • Create the ProjectEcho project from the First Person template.
  • Build two connected rooms (entry corridor and lab) using Additive Box Geometry Brushes.
  • Place a Player Start and confirm you can walk between both rooms in first person.
Create a new project from the First Person template

The First Person template gives you a character that can walk around with WASD and look with the mouse. This saves you from building a player controller from scratch.

  • Press the Windows key to open your search bar.
  • Type Epic Games Launcher and press Enter to open it.
  • Click the Unreal Engine tab on the left side of the launcher.
  • Click Launch next to your installed Unreal Engine version to open the project creation screen.

What if I see a project browser instead?

If the Unreal Editor opens to a project browser showing previous projects, click the New Project button in the top-right to reach the template selection screen.

  • Select the First Person template from the Games category.
  • In the right panel, select the None variant. This gives you a clean first-person character without extra shooter content.
  • Set Blueprint as the project type in Project Defaults.
  • Uncheck Starter Content so you start with a lightweight, empty project.
  • In the Project Name field, type ProjectEcho.
  • Click Create.

The Unreal Editor opens with the default First Person level loaded. You'll see some pre-made geometry in the viewport.

Why the None variant?

The First Person template offers variants like Arena Shooter and Survival Horror that add extra mechanics (weapons, stamina systems). The None variant gives you just a walking character with camera controls. That's all you need for an exploration game.

Create an Empty Level and build the entry corridor

The default level has pre-built content you don't need. You'll create a fresh Empty Level and construct your own rooms from scratch using Geometry Brushes.

  • Click File in the top menu bar.
  • Select New Level.
  • In the dialog that appears, click Empty Level. This gives you a completely blank level with no assets.

Your viewport is now completely black. Time to build the entry corridor.

  • Open the Place Actors panel (if it's not visible, go to Window > Place Actors).
  • Click the Geometry icon (a cube shape) in the Place Actors panel.
  • Drag a Box into the viewport.

A grey box appears in the viewport. Now you'll turn it into a hollow room.

  • With the box selected, look at the Details panel on the right side.
  • Under Brush Settings, check the Hollow checkbox. This creates a hollow space inside the brush, forming walls, a floor, and a ceiling automatically.
  • Set Wall Thickness to 20.
  • Set the brush dimensions to make a corridor shape: X to 800, Y to 300, Z to 300.

What do the X, Y, Z values mean?

In Unreal Engine, 1 unit equals 1 centimetre. So your corridor is 8 metres long, 3 metres wide, and 3 metres tall. The Hollow checkbox tells the engine to carve out the inside, leaving just the walls, floor, and ceiling.

You should see a long rectangular shape in the viewport. If you orbit the camera inside it (hold the right mouse button and use WASD to fly), you'll see a hollow corridor.

  • Add a light so you can see inside the room. In the Place Actors panel, type Point Light in the search bar.
  • Drag a Point Light into the corridor (position it roughly in the centre of the room).

The corridor now glows with light. You can see the floor and walls clearly.

Build the lab room and connect it to the corridor

Now you'll build the larger lab room and connect it to your corridor so the player can walk between both spaces.

  • In the Place Actors panel, click the Geometry icon again.
  • Drag a new Box into the viewport.
  • In the Details panel, check Hollow and set Wall Thickness to 20.
  • Set the lab dimensions: X to 800, Y to 600, Z to 300. This creates a wider room than the corridor.
  • Position this box so one of its short ends sits directly against one short end of the corridor. Use the W key to activate the Move tool, then drag the lab until the walls touch.

Both rooms are now placed side by side, but there's no opening between them. You need to cut a doorway through the shared walls.

  • Drag another Box from the Geometry section in Place Actors into the viewport.
  • In the Details panel, find Brush Type and change it from Additive to Subtractive. A Subtractive brush carves away geometry instead of adding it.
  • Set this brush's dimensions to: X to 150, Y to 100, Z to 250. This creates a doorway-sized opening (1.5m wide, 2.5m tall).
  • Position the Subtractive brush exactly where the two rooms meet, so it overlaps the shared walls. The brush carves through both walls to create a passage.

What is a Subtractive brush?

Additive brushes add solid geometry to your level. Subtractive brushes do the opposite. They remove geometry wherever they overlap with Additive brushes. Think of it like using a cookie cutter to punch a doorway through a wall.

You should now see an opening between the corridor and the lab when you orbit the camera through the level.

  • Add a second Point Light inside the lab room. Search for Point Light in the Place Actors panel and drag it into the centre of the lab.

Both rooms are now lit. You can orbit through the level and see the corridor, the doorway, and the lab clearly.

Don't see a doorway between the rooms?

Make sure your Subtractive brush is set to Subtractive under Brush Type in the Details panel. If it's still Additive, it adds geometry instead of cutting it away.

Also check that the Subtractive brush physically overlaps the walls of both rooms. If it's floating in empty space, it has nothing to cut.

Why isn't my Subtractive brush creating an opening?

Place the Player Start and test your level

Your facility has two rooms and a connecting doorway. Now you need to tell the engine where the player spawns, then test it.

  • In the Place Actors panel, type Player Start in the search bar.
  • Drag a Player Start actor into the entry corridor. Position it so the arrow (indicating the player's facing direction) points toward the lab room.
  • Make sure the Player Start is above the floor and not intersecting any walls.

Before you press Play, think about what you expect to happen. You have a first-person character from the template, two hollow rooms with a doorway, and a Player Start in the corridor. What should you see?

  • Click the green Play button in the top toolbar (or press Alt+P).
  • Use WASD to move and your mouse to look around.
  • Walk from the corridor through the doorway into the lab room.
  • Press Esc to stop playing and return to the editor.

You should spawn inside the corridor and be able to walk through the doorway into the larger lab room. Both rooms are lit and you have full first-person movement.

Falling through the floor or spawning outside?

If you fall infinitely, the Player Start might be below the floor of your corridor brush. Select it and move it up so it sits above the floor surface.

If you spawn outside the rooms entirely, the Player Start is placed outside the corridor's hollow interior. Move it inside the corridor walls.

Help me fix my Player Start position in UE5.

  • Save your level by pressing Ctrl+S. Name it EchoFacility and save it in the Content folder.

Your research facility is built. Next up, you'll bring it to life with story text that appears on screen as you explore different areas.

Add Story Triggers That Display Text On Screen

You built a two-room facility and confirmed you can walk between both rooms in first person. The rooms work, but they feel empty.

Walking through silent corridors gives the player no reason to explore. Story text that appears on screen as you move creates the narrative experience of waking up in an unfamiliar place. In this step, you will build a reusable trigger system that displays text whenever the player enters an area.

In this step, get ready to:
  • Create a Widget Blueprint that displays story text on screen.
  • Build a reusable trigger actor that shows and hides text based on player overlap.
  • Place trigger instances in the level and test narrative playback.
Create the story text widget

Before you can display text on screen, you need a Widget Blueprint that defines what the text looks like and where it sits. UMG (Unreal Motion Graphics) is UE5's built-in UI system.

  • In the Content Browser at the bottom of the editor, right-click in an empty area.
  • Select User Interface, then Widget Blueprint.
  • Name it WBP_StoryText.
  • Double-click WBP_StoryText to open it in the Widget Designer.

The Widget Designer opens with a blank canvas. You need a Text Block widget centered on screen.

  • In the Palette panel on the left, search for Text.
  • Drag a Text widget into the center of the Designer Viewport canvas.
  • With the Text widget selected, look at the Details panel on the right.
  • Under Anchors, select the center anchor preset (the one with arrows pointing to center from all sides).
  • Set Position X and Position Y both to 0.
  • Set Alignment to 0.5, 0.5 so the text is perfectly centered.
  • Under Appearance, change the font size to 24 and the color to white so it reads clearly.

Now you need to expose this Text widget as a variable so other Blueprints can change its content at runtime.

  • Select the Text widget in the Hierarchy panel (top left of the designer).
  • Check the Is Variable checkbox in the Details panel.
  • Rename the widget to StoryTextBlock by clicking its name in the Hierarchy panel.
  • Click Compile (top left toolbar) and then Save.

You should see StoryTextBlock listed under Variables in the My Blueprint tab on the left side.

What does Is Variable do?

Checking Is Variable on a widget exposes it as a variable in the Blueprint graph. This means other Blueprints can get a reference to this specific Text Block and change its text at runtime. Without it, the Text Block is invisible to scripting.

Don't see Is Variable in the Details panel?

Make sure you have the Text widget itself selected in the Hierarchy, not the canvas root. The Is Variable checkbox appears near the top of the Details panel when a widget is selected.

Help me find it

Build the story trigger Blueprint

The widget can display text, but something needs to trigger it. You will create a Blueprint Actor with an invisible collision box that detects when the player walks through it.

  • Return to the Content Browser.
  • Right-click in an empty area.
  • Select Blueprint Class.
  • In the Pick Parent Class window, choose Actor.
  • Name it BP_StoryTrigger.
  • Double-click BP_StoryTrigger to open the Blueprint Editor.

Now add a Box Collision component that will detect the player.

  • In the Components tab (top left), click + Add.
  • Search for Box Collision and add it.
  • Select the Box Collision component.
  • In the Details panel, under Collision, set the Collision Preset to OverlapOnlyPawn.
  • Confirm that Generate Overlap Events is checked.
  • Scale the Box Collision to roughly 200 x 200 x 200 so it covers an area the player walks through.

What is OverlapOnlyPawn?

This collision preset tells the box to only detect overlaps with Pawn-type actors (like the player character). It will not block movement or react to other objects in the world.

Next, add a text variable that stores the unique story message for each trigger instance.

  • In the My Blueprint tab on the left, click the + button next to Variables.
  • Name the new variable StoryMessage.
  • In the Details panel for this variable, set the Variable Type to Text.
  • Check the Instance Editable checkbox (the open eye icon).
  • Click Compile to save the variable.

Why make StoryMessage Instance Editable?

Instance Editable means you can set a different StoryMessage value on every trigger you place in the level. One trigger says "Where am I?" and another says "The lab feels abandoned." Same Blueprint, different content per instance.

Now wire up the overlap logic in the Event Graph. When the player walks in, the widget appears.

  • Switch to the Event Graph tab at the top of the Blueprint Editor.
  • In the Components tab, select the Box Collision component.
  • Scroll down in the Details panel to the Events section.
  • Click the + button next to On Component Begin Overlap.
  • This creates an event node in the graph.

Now build the "show text" logic from this event node.

  • Drag from the execution pin (white arrow) of the OnComponentBeginOverlap node.
  • Search for Create Widget and add it.
  • On the Create Widget node, set the Class dropdown to WBP_StoryText.
  • Drag from the Return Value pin of Create Widget.
  • Search for Set Text (Text) and select it.

Connect the Set Text node so it knows which Text Block to update and what content to display.

  • On the Set Text node, connect the Target pin to StoryTextBlock from the Create Widget Return Value (drag from Return Value and choose Get Story Text Block).
  • For the In Text pin on Set Text, drag in your StoryMessage variable from the My Blueprint panel.
  • Drag from the execution pin of Set Text and search for Add to Viewport.
  • Connect the Target of Add to Viewport to the Return Value of Create Widget.

What does this node chain do?

When the player enters the Box Collision, the Blueprint creates a new instance of WBP_StoryText, sets the Text Block content to whatever StoryMessage says, and adds it to the player's screen.

Each trigger instance carries its own StoryMessage text, so different areas display different lines of the story.

Now you need to remove the widget when the player leaves the trigger area.

  • Right-click the Return Value pin of the Create Widget node and select Promote to Variable.
  • Name the promoted variable ActiveWidget.
  • Back in the Components tab, select the Box Collision again.
  • In the Details panel under Events, click the + next to On Component End Overlap.

Wire the end overlap event to remove the widget from the screen.

  • Drag from the execution pin of OnComponentEndOverlap.
  • Drag in the ActiveWidget variable and choose Get.
  • From the ActiveWidget reference, drag and search for Remove from Parent.
  • Connect the execution pin from OnComponentEndOverlap to Remove from Parent.
  • Click Compile and then Save.

The Compile should succeed with no errors. If you see a warning about unconnected pins, double-check that all execution pins are wired in sequence.

Compile failed with errors?

Make sure the Class on Create Widget is set to WBP_StoryText and not left blank. Also confirm you compiled and saved WBP_StoryText before opening BP_StoryTrigger.

Help me debug this

Place triggers in the level and test

Your trigger Blueprint is ready. Now you will place two instances in the level, each with a different story message.

  • Return to the Level Editor (click the level tab at the top).
  • In the Content Browser, find BP_StoryTrigger.
  • Drag BP_StoryTrigger into the entry corridor room.
  • With the placed trigger selected, look at the Details panel on the right.
  • Find the Story Message field (under Default) and type: Where am I? This place feels... familiar.
  • Drag a second BP_StoryTrigger into the lab room.
  • Select it and set its Story Message to: The equipment is still running. Someone left in a hurry.

Why different messages per instance?

Because you marked StoryMessage as Instance Editable, each trigger in the level can carry its own unique text. You built one Blueprint but it powers every story moment in the game.

Before you press Play, what do you expect to happen when you walk into the first trigger?

  • Press Play in the editor toolbar.
  • Walk forward into the entry corridor trigger area.
  • Walk out of the trigger and confirm the text disappears.
  • Continue into the lab room and walk through the second trigger.
  • Press Esc to stop the play session.

You should see the first story line appear on screen when you enter the corridor trigger. Different text appears in the lab. The text disappears when you leave each area.

Text not appearing on screen?

Make sure the Box Collision on each placed trigger is large enough that you actually walk through it. Select the trigger in the level and check its scale in the Details panel.

If you see the widget flash and vanish instantly, confirm you are not overlapping and immediately leaving the trigger at spawn. Move the entry corridor trigger slightly away from the Player Start.

Help me debug this

Your facility now tells a story. Next up, you will give the player something to actually do by creating a collectible keycard that powers the escape puzzle.

Create the Keycard Pickup

Your facility has atmosphere now. Story text appears as you explore, drawing the player deeper into the mystery. But you are still a passive observer. There is nothing to actually do.

A collectible keycard changes everything. It gives the player agency and creates the core puzzle mechanic: find this object, then use it to escape. In this step, you will build a pickup actor that the player can collect by walking into it.

In this step, get ready to:
  • Create a BP_Keycard actor with a glowing mesh and collision trigger.
  • Add a HasKeycard inventory variable to the player character.
  • Wire up the pickup logic so the keycard disappears and confirms collection on screen.
Create the BP_Keycard Blueprint Actor

The keycard needs to be visible in the world and detectable when the player walks into it. You will build it from two components: a small mesh the player can see, and a collision box that detects overlap.

  • In the Content Browser, right-click in an empty area.
  • Select Blueprint Class.
  • In the class picker, choose Actor as the parent class.
  • Name the new Blueprint BP_Keycard.
  • Double-click BP_Keycard to open it in the Blueprint Editor.

Now add the visual mesh that represents the keycard in the world.

  • In the Components panel on the left, click Add and search for Static Mesh.
  • Add a Static Mesh component.
  • In the Details panel on the right, find the Static Mesh dropdown. Select Cube (the basic engine shape).
  • Under Transform, set the Scale to 0.3 on X, 0.5 on Y, and 0.02 on Z. This makes it flat and card-shaped.

You should see a thin rectangular shape in the Blueprint Editor viewport. It looks like a card.

Next, add a Box Collision component so the engine can detect when the player walks into the keycard.

  • Click Add again in the Components panel and search for Box Collision.
  • Add the Box Collision component.
  • In its Details panel, set the Box Extent to 50 on X, 50 on Y, and 50 on Z. This makes the trigger area larger than the mesh so it is easy to walk into.
  • Scroll down to the Collision section. Set Collision Presets to OverlapOnlyPawn.
  • Make sure Generate Overlap Events is checked (enabled).

Why OverlapOnlyPawn?

This collision preset means only Pawn-type actors (like the player character) trigger overlap events. Other objects in the level will not accidentally fire the pickup logic.

  • Click Compile in the toolbar, then click Save.

Now give the keycard a bright glowing material so players can spot it easily in the dark rooms.

  • Switch back to the Content Browser. Right-click in an empty area and select Material.
  • Name it M_KeycardGlow.
  • Double-click M_KeycardGlow to open the Material Editor.
  • Right-click on the graph and add a Constant3Vector node (this sets the color). Double-click it and choose a bright green or cyan color.
  • Right-click and add a Multiply node.
  • Connect the Constant3Vector output to the A input of the Multiply node.
  • Right-click and add a Constant node. Set its value to 10 (this controls glow intensity).
  • Connect the Constant output to the B input of the Multiply node.
  • Connect the Multiply output to the Emissive Color input on the main material node.
  • Click Apply and Save in the Material Editor.

What does the Emissive Color input do?

The Emissive Color input makes a material appear to glow from within. Multiplying the color by a value greater than 1 intensifies the brightness, making it bloom and stand out against the dark environment.

  • Return to BP_Keycard in the Blueprint Editor.
  • Select the Static Mesh component. In Materials > Element 0, replace the material with M_KeycardGlow.
  • Click Compile and Save.

In the Blueprint Editor viewport, you should see your small flat cube now glowing with your chosen bright color.

Cube not glowing in the preview?

Make sure you connected the Multiply output to Emissive Color (not Base Color) on the main material node. Also confirm the Constant value is set to 10 or higher for visible glow.

If the material still does not appear, check that you clicked Apply in the Material Editor before returning to the Blueprint.

Help me troubleshoot this

Add the HasKeycard variable to your character

Before wiring the pickup logic, the player character needs a way to remember that it collected the keycard. A Boolean variable on the character acts as a simple inventory flag.

  • In the Content Browser, navigate to Content/FirstPerson/Blueprints.
  • Double-click BP_FirstPersonCharacter to open it in the Blueprint Editor.
  • In the My Blueprint panel on the left, find the Variables section.
  • Click the + button next to Variables to add a new variable.
  • Name it HasKeycard.
  • In the Details panel on the right, set the Variable Type to Boolean.
  • Make sure the Default Value is unchecked (false). You may need to click Compile first to see the default value field.
  • Click Compile and Save.

You should see HasKeycard listed under Variables in the My Blueprint panel with a Boolean (red) icon.

What is this variable for?

This single Boolean acts as the player's inventory. When the player picks up the keycard, the value flips to true. Later, the locked door checks this value to decide whether to open.

Wire up the pickup logic and test

Now connect everything in the BP_Keycard Event Graph. When the player overlaps the collision box, the Blueprint will set HasKeycard to true, flash a confirmation message, and destroy the keycard actor.

  • Open BP_Keycard and switch to the Event Graph tab.
  • Select the Box Collision component in the Components panel.
  • In the Details panel, scroll to Events. Click the + button next to On Component Begin Overlap. This adds a red event node to your graph.

First, cast to the player character so you can access the HasKeycard variable.

  • Drag from the Other Actor output pin of the overlap event node.
  • Search for Cast To BP_FirstPersonCharacter and add that node.
  • Connect the white execution pin from On Component Begin Overlap to the Cast To node's execution input.

Next, set the HasKeycard variable to true on the character.

  • Drag from the As BP First Person Character output pin (the blue object pin on the Cast node).
  • Search for Set Has Keycard and add the setter node.
  • Check the box on the Set Has Keycard node so it sets the value to true.
  • Connect the execution pin from the Cast node's success output to Set Has Keycard.

Now show a brief confirmation message on screen using the WBP_StoryText widget you already have.

  • Drag from the execution output of Set Has Keycard.
  • Search for Create Widget and add that node.
  • In the Class dropdown on the Create Widget node, select WBP_StoryText.
  • Drag from the Return Value output of Create Widget. Search for Set Story Text Block (or whatever you named your exposed Text Block variable). Set the text to Keycard Acquired.
  • Drag from the execution output of the Set text node. Add an Add to Viewport node. Connect the Return Value (widget reference) from Create Widget to the Target input.

Add a short delay before removing the widget and destroying the keycard.

  • Drag from the execution output of Add to Viewport. Search for Delay and add that node. Set the Duration to 2.0 seconds.
  • From the Delay's Completed output, add a Remove from Parent node. Connect the widget reference (from Create Widget's Return Value) to the Target.
  • From Remove from Parent's execution output, add a Destroy Actor node. Leave the Target as Self (the default). This destroys the keycard actor itself.

What does this Event Graph do?

  • When the player overlaps the box collision, the Cast node confirms it is actually the player character (not some other actor).
  • It sets HasKeycard to true on the character, marking that the player now holds the keycard.
  • It creates a WBP_StoryText widget showing "Keycard Acquired" and adds it to the screen.
  • After 2 seconds, the widget is removed and the keycard actor is destroyed (disappears from the level).
  • Click Compile in the toolbar. You should see a green checkmark confirming no errors.
  • Click Save.

Compile showing errors?

If you see an error about HasKeycard not being found, confirm you added the variable to BP_FirstPersonCharacter and compiled that Blueprint first. The Cast node needs the target Blueprint to be compiled before it can see its variables.

If the Create Widget node shows a warning, make sure you selected WBP_StoryText in its Class dropdown.

Help me fix my BP_Keycard compile errors

Now place the keycard in your level and test the full pickup.

  • Switch to the Level Editor (your custom level).
  • Drag BP_Keycard from the Content Browser into the viewport.
  • Place it on a surface in the lab room (on a table, shelf, or the floor). Position it so the player can see it when exploring.
  • Use the Move tool (W key) to fine-tune placement. Make sure it is not clipping through the floor or walls.

Before you press Play, take a moment to predict what will happen. When you walk into the glowing keycard, what do you think you will see?

  • Press Play in the editor toolbar.
  • Walk over to the lab room and approach the glowing keycard.
  • Walk directly into it.

The keycard disappears from the level and "Keycard Acquired" text appears on screen for 2 seconds. After the text fades, the keycard is gone from the world permanently for this play session.

Keycard not disappearing when you walk into it?

Check that Generate Overlap Events is enabled on the Box Collision component in BP_Keycard. Also verify the collision preset is set to OverlapOnlyPawn.

If the text appears but the keycard stays, make sure the Destroy Actor node's Target is set to Self (the default). If it is connected to something else, disconnect it so it defaults to self.

Help me troubleshoot my keycard pickup

Your player now has something to find and collect. The keycard is in their inventory (tracked by the HasKeycard variable), but there is nowhere to use it yet. Next up, you will build the locked door that checks for this keycard and rewards the player with escape.

Build the Locked Door and Win Condition

You have a keycard sitting in the lab, but nowhere to use it. Without a locked door that responds to the keycard, picking it up is meaningless.

In this step, you'll build the payoff for the entire game. A locked exit door checks whether you have the keycard, and a victory screen appears when you finally escape.

In this step, get ready to:
  • Create a BP_LockedDoor actor with a door mesh and trigger zone.
  • Wire up conditional Blueprint logic that checks for the keycard.
  • Build a win screen widget and test the complete game loop.
Create the BP_LockedDoor actor

The locked door needs two things: a visible panel the player sees blocking their path, and an invisible trigger zone that detects when the player walks up to it.

  • In the Content Browser, right-click and select Blueprint Class.
  • Choose Actor as the parent class.
  • Name it BP_LockedDoor.
  • Double-click BP_LockedDoor to open it in the Blueprint Editor.

Now add the door panel mesh.

  • In the Components panel, click Add and select Static Mesh.
  • In the Details panel, set the Static Mesh property to Cube (search for it in the dropdown).
  • Scale the cube to look like a door panel. Set the Scale to approximately 2.0 on X, 0.1 on Y, and 3.0 on Z.

Next, add the trigger zone that detects the player approaching.

  • In the Components panel, click Add and select Box Collision.
  • Position the Box Collision in front of the door mesh (offset it on the Y axis so it sits where the player approaches from).
  • Scale the Box Collision so it is larger than the door itself. The player needs to walk into this zone to trigger the logic.
  • Click Compile and Save at the top of the Blueprint Editor.

What are the two components doing?

The Static Mesh is the visible door panel that blocks the player's path. The Box Collision is an invisible zone in front of the door.

When the player walks into the Box Collision, it fires an overlap event. Your Blueprint logic will respond to that event and decide whether to open the door.

You should see your BP_LockedDoor in the viewport preview with a tall flat cube and a box wireframe in front of it.

Wire up the door's conditional logic

This is where the game's puzzle comes together. The door needs to ask one question when the player approaches: do they have the keycard?

  • In BP_LockedDoor's Blueprint Editor, switch to the Event Graph tab.
  • In the Components panel, select your Box Collision component.
  • Scroll down in the Details panel to the Events section.
  • Click the + button next to On Component Begin Overlap to add the event node to your graph.

Now build the logic chain from this overlap event.

  • Drag from the Other Actor pin on the overlap node and search for Cast To BP_FirstPersonCharacter. Select it to add the cast node.
  • Connect the execution (white) pin from On Component Begin Overlap to the Cast To BP_FirstPersonCharacter node.
  • Drag from the As BP First Person Character output pin on the cast node and search for Get HasKeycard. Select it.
  • Drag from the HasKeycard Boolean output pin and search for Branch. Add the Branch node.
  • Connect the execution pin from the cast node to the Branch node.

What is the Branch node?

A Branch node is Blueprint's version of an if/else statement. It takes a Boolean condition and splits execution into two paths: True and False.

If HasKeycard is true, the player has picked up the keycard and the door should open. If false, the player has not found it yet.

Now wire the True path (player has the keycard).

  • From the True execution pin on the Branch, drag out and search for Set Visibility. Add the Set Visibility node.
  • Drag your Static Mesh component from the Components panel into the Event Graph to create a reference to it.
  • Connect that Static Mesh reference to the Target pin on Set Visibility.
  • Leave the New Visibility checkbox unchecked (false). This hides the door mesh when triggered.
  • From the Set Visibility execution output, drag and search for Create Widget. Add it.
  • Leave the Class dropdown on the Create Widget node empty for now. You will set it to WBP_WinScreen after creating that widget in the next substep.
  • From the Return Value pin on Create Widget, drag and search for Add to Viewport. Connect it.

Optionally, wire the False path to show a hint message.

  • From the False execution pin on the Branch, drag and search for Print String.
  • In the Print String node, type Locked - Find the keycard in the In String field.
  • Click Compile and Save.

What does this Event Graph do?

When the player overlaps the Box Collision, the graph casts to your character Blueprint to access the HasKeycard variable.

The Branch node checks that Boolean. On True: it hides the door mesh (the door "opens") and displays the victory widget. On False: it prints a hint message to the screen telling the player to find the keycard.

Compile error on the cast node?

Make sure you are casting to BP_FirstPersonCharacter, not the generic Character class. Search the full name in the cast node dropdown.

If HasKeycard does not appear when dragging from the cast output, confirm you added the Boolean variable to BP_FirstPersonCharacter in the previous step and compiled that Blueprint.

help me fix a cast or variable error in my BP_LockedDoor Event Graph

Create the win screen and test the full game loop

The victory widget is what the player sees when they escape. You also need to place the door in your level and connect everything together for the final playtest.

  • In the Content Browser, right-click and select User Interface then Widget Blueprint.
  • Name it WBP_WinScreen.
  • Double-click WBP_WinScreen to open the Widget Designer.
  • From the Palette panel, drag a Text widget onto the canvas.
  • In the Details panel, set the Text content to You Escaped Project Echo!.
  • Center the text by setting its Anchors to center (the middle option in the anchor presets) and its Alignment to 0.5, 0.5.
  • Increase the font size to something large and readable (such as 48).
  • Click Compile and Save the widget.

Now connect the win screen to your door logic.

  • Open BP_LockedDoor again and switch to the Event Graph.
  • Find your Create Widget node on the True path.
  • Click the Class dropdown and select WBP_WinScreen.
  • Click Compile and Save.

Why create the widget separately?

The Create Widget node needs a Widget Blueprint class to reference. By creating WBP_WinScreen first, you can select it from the Class dropdown in your door's Event Graph.

Finally, place the door in your level.

  • Switch back to your level editor tab.
  • Drag BP_LockedDoor from the Content Browser into the viewport.
  • Position it at the far end of the lab room, blocking the exit. It should look like a wall panel the player cannot pass through.
  • Make sure the Box Collision trigger is facing the direction the player approaches from.

Before you hit Play, think about this: what should happen if you walk straight to the door without picking up the keycard first? What about after you pick up the keycard?

  • Press Play in the editor toolbar.
  • Walk directly to the locked door without picking up the keycard.
  • Press Escape to stop playing.
  • Press Play again.
  • This time, walk into the keycard first to pick it up. Then approach the door.

Without the keycard, the door stays solid and you see the hint text on screen. With the keycard, the door disappears and the victory text appears.

Door not responding when you walk up?

Make sure the Box Collision's Generate Overlap Events is checked in the Details panel. Also confirm the collision preset is set to OverlapOnlyPawn so it responds to the player character.

If the door disappears but no win screen shows, open BP_LockedDoor and confirm the Create Widget node's Class is set to WBP_WinScreen (not empty).

help me debug why my locked door is not working in Project Echo

Your escape game has a complete loop: explore the facility, read story clues, find the keycard, and use it to unlock the exit. Next up, you'll extend the experience with a hidden secret room for curious players to discover.

Secret mission

Add a Hidden Room With an Alternate Story Clue

The base game is linear. Every player walks through the same two rooms and reads the same story. What if there was a hidden passage that only curious players would find? In this mission, you'll extend your facility with a secret third room containing an alternate story clue that rewards exploration.

Clean Up Your Resources

Clean Up Your Resources

Decide whether to keep your resources running, pause them to come back later, or delete them entirely.

This project runs entirely locally on your PC. There are no cloud resources, subscriptions, or ongoing costs.

Resources you used:

  • The ProjectEcho Unreal Engine project folder on your local hard drive.

Keep everything running

No action needed. Choose this if you want to keep building on Project Echo or replay it later.

  • Your ProjectEcho folder stays on your hard drive wherever you saved it during project creation.
  • Open it anytime from the Epic Games Launcher by navigating to the Library tab and selecting your project under My Projects.

Pause - I'll come back to this later

Since this is a local project with no running servers or cloud processes, there is nothing to pause.

  • Close the Unreal Editor to free up RAM and GPU resources.
  • Your project files remain on disk and you can reopen the project from the Epic Games Launcher whenever you are ready.

Delete - I don't want to use this again

Remove the project folder entirely to reclaim disk space.

  • Close the Unreal Editor if it is still open.
  • Open File Explorer and navigate to the folder where you saved ProjectEcho during project creation.
  • Right-click the ProjectEcho folder and select Delete.
  • Empty your Recycle Bin to fully reclaim the disk space.

Nice Work!

Nice Work!

You just built a complete first-person mystery escape game from scratch in Unreal Engine 5. A player can now walk through your facility, uncover the story of Project Echo, find a keycard, and escape.

Here's what you accomplished:

  • Built a multi-room research facility from scratch using Geometry Brushes and brought it to life with story triggers that display narrative text as the player explores.
  • Implemented a keycard pickup mechanic with inventory tracking using a Boolean variable on the character Blueprint.
  • Created a locked door with conditional logic that checks whether the player has the keycard, completing a full game loop from exploration to escape.
  • Secret Mission: Extended the level with a hidden room and an alternate story clue that rewards curious players.

Ready to quiz yourself?