Unreal: plan a switch that opens one door
Use a small Blueprint exercise to learn actor references, explicit state, and a repeatable interaction test.
First Play Studios · Edition 1 · Updated November 14, 2026
A test switch requests one assigned door to open without repeatedly moving it farther away.
Before you start- An existing Unreal Engine 5 practice project
- Know how to create an Actor Blueprint and connect execution pins
In this guide
Choose the smallest communication problem
Blueprint communication lets one object request behavior from another. For one known switch and one known door, a direct actor reference is an understandable starting point. Event dispatchers and interfaces solve different communication needs, but they are extra decisions for this first experiment.
Name the contract before connecting nodes: the switch requests OpenDoor, and the door decides whether that request changes anything. This keeps the switch from needing to know how far the mesh moves or whether it is already open.
Describe the graph before constructing it
Create BP_PracticeDoor with a Scene root and a movable Static Mesh child named DoorPanel. Give it an IsOpen Boolean, initially false, and an OpenDoor custom event. The event checks IsOpen; when false, it sets it true and moves DoorPanel to one fixed open relative location. A simple upward jump is enough for this prototype.
Create BP_PracticeSwitch with an instance-editable TargetDoor variable whose type is a BP_PracticeDoor object reference. Its Activate custom event checks that TargetDoor is valid, then calls OpenDoor on that reference. Place both actors and assign the placed door to the switch’s TargetDoor field. This is a graph recipe, not a pasteable Blueprint file.
Prove communication before wiring input
For a temporary test, use the Level Blueprint’s BeginPlay to call Activate on the placed switch, then call it again after a short Delay. The first call should open the door; the second should leave it at exactly the same open position. Remove this automatic test wiring when you later connect a player interaction.
A fixed target position makes repeated requests predictable. Adding an offset to the current position on every request would keep moving the door. Smooth animation, overlap filtering, input mapping, sound, and networking are separate follow-up tasks, so this guide does not claim to supply them.
Test the request and the guard separately
- Build the two actor Blueprints and assign the placed door reference on the switch.
- Use temporary BeginPlay and Delay wiring to send two Activate requests.
- Record the door panel’s location after each request and compare them.
- Restart the level and verify that the door begins closed again.
- In a separate test, leave TargetDoor unassigned. Use a clear diagnostic message on the invalid branch instead of calling a missing reference.
Check your result.
- The switch affects its assigned door.
- The second request does not move the door farther or retrigger the opening rule.
- An unassigned target produces a useful diagnostic rather than an uncontrolled call.
Common mistakes to watch for.
- A variable of the right type can still have no instance assigned.
- A Construction Script is not the place for this runtime interaction test.
- Testing with BeginPlay does not validate player controls or multiplayer behavior.
Keep the conversation useful.
I’m using Unreal Engine 5 and building BP_PracticeSwitch with a TargetDoor reference and BP_PracticeDoor with an OpenDoor event. Help me turn this graph recipe into nodes for my exact engine version. First verify the reference and IsOpen guard using two test requests. Leave player input and animation for a later step.
Sources & version notes.
Unreal Engine 5 concepts. Documentation-based Blueprint graph recipe, not an editor-tested project. Confirm node details in the documentation for your installed minor version.
Further reading from the original documentation:
Practice times are estimates. Software-specific exercises are documentation-based unless their version note says otherwise.A question or a small win?
Tell the workshop what happened when you tried this guide. Ask for a useful next step, or share something you got working.
See discussions about this guide We’ll include the guide link in your draft. Sign in to post, then add your own question or progress before sharing.