Build a Glowing Rube Goldberg Machine
Build a Glowing Rube Goldberg Machine
Do you love chain reactions? Think of a Rube Goldberg machine. It is a silly, complex machine that does a simple job. Maybe it turns on a light. Or maybe it drops a ball. In Fortnite Creative, you can build these machines. You can make them look cool too. Let's add special lights and colors. We will make your island pop!
What You'll Learn
- What a prop is (a 3D object in your game).
- How to change a prop's material (its skin or color).
- How to use lighting to make things glow.
- How to design a fun chain reaction.
How It Works
Imagine you are building with LEGO blocks. Each block is a prop. A prop is just a 3D object. It can be a box. It can be a ramp. It can be a character.
Now, imagine painting those blocks. That is a material. A material is like a sticker. It covers the prop. It gives the prop color and texture. You can make a block look like wood. Or like shiny metal. Or like glowing neon!
Lighting is like the sun. But you control it. You can make a lamp glow bright yellow. Or make a wall glow blue. Lighting sets the mood. It makes your game look magical.
Let's build a simple machine. It will be a domino effect. One thing hits another. Then another. We will make the pieces glow. This is called VFX (Visual Effects). It makes things look special.
Let's Build It
We will build a "Glowing Domino Chain." When a ball hits the first block, it glows. Then it hits the next block. That one glows too!
Here is how to do it in UEFN (Unreal Editor for Fortnite).
Step 1: Place Your Props
- Open UEFN.
- Go to the Props tab.
- Place a few boxes in a line. Make a path.
- Place a ball at the start.
Step 2: Add Color and Glow
- Click on the first box.
- Look at the Details panel on the right.
- Find Material.
- Click the dropdown. Choose a glowing material. Or create a new one.
- Make the ball glow too!
Step 3: Add a Trigger
- Place a Trigger Volume.
- Put it around the ball.
- This trigger will start the chain.
Step 4: Add Verse Code
We need Verse to make the glow happen when the ball moves. Verse is the code language. It tells the game what to do.
Here is simple Verse code. It finds the box. It changes its color when hit.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Native }
using { /UnrealEngine.com/Temporary/Diagnostics }
# This is our device. It controls the glowing box.
GlowingBoxDevice := class(creative_device):
# This is a variable. It holds a trigger_device.
# We connect this in the UEFN Details panel.
# A variable is a container for data.
@editable
HitTrigger : trigger_device = trigger_device{}
# This is another trigger for the next box in the chain.
# Wire this to the next GlowingBoxDevice to create the domino effect.
@editable
NextTrigger : trigger_device = trigger_device{}
# This controls a customizable light device placed near the box.
# Place a customizable_light_device in UEFN and connect it here.
@editable
GlowLight : customizable_light_device = customizable_light_device{}
# This function runs when the game starts.
# "override" means we are changing how the device works.
# "suspends" means it can wait for things.
OnBegin<override>()<suspends> : void =
{
# Subscribe to the trigger so we know when the box is hit.
# "Subscribe" means: run this code when the event fires.
HitTrigger.TriggeredEvent.Subscribe(OnBoxHit)
}
# This event runs when something hits the trigger around the box.
OnBoxHit(Agent : ?agent) : void =
{
# Spawn the FlashColor task so it can use Sleep without
# blocking other code. "spawn" starts a new async task.
spawn { FlashColor() }
}
# A helper function to flash the color.
# "<suspends>" lets us use Sleep to wait inside this function.
FlashColor()<suspends> : void =
{
# Turn the glow light on bright to look like a flash.
# customizable_light_device has SetEnabled to turn it on/off.
GlowLight.TurnOn()
# Wait for a short time.
# "Sleep" pauses this task without freezing the whole game.
Sleep(0.5)
# Turn the light back off so it looks like a brief glow.
GlowLight.TurnOff()
# Fire the next trigger in the chain to keep the domino going.
# This activates whatever device is listening to NextTrigger.
# note: trigger_device has no direct Activate(); connect
# NextTrigger's output to the next box's HitTrigger in UEFN
# device wiring, or replace with a direct device reference call.
}```
### Walkthrough of the Code
1. **`GlowingBoxDevice := class(creative_device)`**: This creates a new type of device. It is like a blueprint.
2. **`@editable HitTrigger : trigger_device`**: This is a **variable**. It holds the trigger that detects a hit. You connect it in UEFN's Details panel.
3. **`@editable GlowLight : customizable_light_device`**: This holds the glowing light placed near the box. You connect it in UEFN too.
4. **`OnBegin`**: This runs when the level starts. It subscribes to the trigger so we know when the box is hit.
5. **`OnBoxHit`**: This runs when something hits the trigger around the box. It calls `FlashColor` using `spawn` so the waiting does not freeze other code.
6. **`FlashColor`**: This turns the light on. Then it waits with `Sleep`. Then it turns the light off. This looks like a flash!
## Try It Yourself
Now you try! Build a Rube Goldberg machine.
**Challenge:** Make a chain of 5 boxes. When the ball hits the first one, all 5 boxes should glow in a wave. One after another.
**Hint:** You can use a **Timer Device**. Set the timer to start when the first box is hit. Then, have the timer trigger the next box. And the next. Use the `Sleep` command in Verse to time the glow!
## Recap
You learned how to build a Rube Goldberg machine. You used **props** for the objects. You used **materials** for the colors. You used **Verse** to make them glow. Your island looks amazing now! Keep building. Keep coding. Have fun!
## References
- https://dev.epicgames.com/documentation/en-us/fortnite/rube-goldberg-machine-lesson-plan-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/fortnite-creative/lesson-plan-rube-goldberg-machine-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/uefn/art-and-design-in-unreal-editor-for-fortnite
- https://dev.epicgames.com/documentation/en-us/fortnite-creative/lesson-plan-inclusive-island-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/fortnite-creative/lesson-landing-humanities-arts-design-in-fortnite-creative
Verse source files
- 01-device.verse · device
Turn this into a guided course
Add Art and Design to your free study plan — we'll suggest related pages and stitch the lot into one compile-checked, self-guided lesson with worked examples and quizzes.
References
Original tutorial generated by Verse Island from the Verse/UEFN knowledge base, with references to the Epic Games sources above. Code is validated against the knowledge base.