Build Your Own Game Settings Menu with Verse
Build Your Own Game Settings Menu with Verse
Imagine you are building a race track. Some players like it slow. Some like it super fast. How do you let them choose? You don't need to build two different maps! You can build one map with User Options. These are settings players can change before the game starts. We will use Verse to make a simple "Speed Control" for a moving platform. It is like a remote control for your island.
What You'll Learn
- What User Options are in UEFN (Unreal Editor for Fortnite).
- How to create a setting that players can change.
- How Verse reads that setting to change game behavior.
- How to link a device to your code.
How It Works
Think of a User Option like a dial on a stereo. The dial has a number. If you turn it to 5, the music is quiet. If you turn it to 10, it is loud. In Fortnite, the dial is a number or a list. You set the dial in the editor. Your Verse code reads the dial. Then, your code acts based on that number.
In UEFN, every device has a Details Panel. This is like a toolbox for that object. Inside, there is a section called User Options. This is where you define your settings. You can make a setting for speed, health, or color.
Verse is the brain. The device is the body. The User Option is the instruction. Verse looks at the instruction. Then, Verse tells the device what to do. This makes your island smart. It adapts to what the player wants.
Let's Build It
We will build a Prop Mover. This is a device that moves objects. We will add a User Option called TravelSpeed. Players can pick a speed in the editor. Verse will read that speed. Then, the mover will move at that speed.
Here is the code. Copy this into a Verse file in your project.
using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Simulation }
# This is our main script. It connects to a Prop Mover device.
# We call this a "Device Script".
MoveWithSpeed := class(creative_device):
# This is the device we are controlling.
# It must be a Prop Mover.
# Drag the Prop Mover from the Outliner onto this slot in the Details Panel.
@editable
Mover: prop_mover_device = prop_mover_device{}
# This is our User Option.
# It is a number. Players can change it in the editor.
# The default value is 10.0.
@editable
TravelSpeed: float = 10.0
# This function runs when the game starts.
OnBegin<override>()<suspends>: void =
# We enable the Prop Mover so it is ready to receive commands.
Mover.Enable()
# We tell the mover to travel at the speed defined by TravelSpeed.
# The Prop Mover moves along the path set up in the editor.
# SetTargetSpeed controls how fast it travels along that path.
# note: prop_mover_device does not expose a velocity vector API;
# SetTargetSpeed(float) is the closest real method available.
Mover.SetTargetSpeed(TravelSpeed)
# We start the mover moving forward along its path.
Mover.Advance()```
### Walkthrough
1. **`TravelSpeed: float = 10.0`**: This line creates a variable. A variable is a box that holds a value. Here, it holds a decimal number. The `10.0` is the default. You can change this default in the editor later.
2. **`Mover: prop_mover_device`**: This tells Verse we are working with a Prop Mover. A Prop Mover is a device that slides, rotates, or moves objects.
3. **`@editable`**: This tag appears above both `Mover` and `TravelSpeed`. It is what makes them appear in the **Details Panel** inside UEFN. Without `@editable`, the editor cannot see the variable at all. You drag your Prop Mover from the Outliner onto the `Mover` slot that appears in the Details Panel.
4. **`Mover.SetSpeed(TravelSpeed)`**: This is the action. It tells the mover how fast to travel along its path. We use `TravelSpeed` here. If you change the User Option to 20.0, the mover goes twice as fast.
5. **`Mover.MoveForward()`**: This starts the mover travelling in the forward direction along its editor-defined path.
### How to Set It Up in UEFN
1. Place a **Prop Mover** in your world.
2. In the **Outliner** (the list on the right), you can give it any name you like — for example, `MyMover`. This is just for your own organisation.
3. Select the **MoveWithSpeed** device (your Verse script device) in the world.
4. Open the **Details Panel** (usually on the right side).
5. You will see two editable fields: `Mover` and `TravelSpeed`. Drag your Prop Mover from the Outliner into the `Mover` slot.
6. Change `TravelSpeed` to `5.0` or `20.0`.
7. Play your island. The mover will move at the speed you chose.
## Try It Yourself
Can you make the mover go backwards? The `prop_mover_device` has a method for that too!
**Hint:** Look at the line `Mover.MoveForward()`. Try replacing it with `Mover.MoveBackward()`. What happens?
## Recap
User Options are like dials on a machine. They let players or creators change settings before the game starts. Verse reads these settings. Then, Verse uses them to control devices. This makes your island flexible. You can build one map that plays differently for everyone.
## References
- https://dev.epicgames.com/documentation/en-us/fortnite/using-roly-poly-devices-in-fortnite
- https://dev.epicgames.com/documentation/en-us/fortnite/using-overlord-spire-devices-in-fortnite
- https://dev.epicgames.com/documentation/en-us/fortnite/using-prop-mover-devices-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/fortnite/using-voting-group-and-voting-options-devices-in-fortnite
- https://dev.epicgames.com/documentation/en-us/fortnite/using-fuel-pump-devices-in-fortnite-creative
Verse source files
- 01-device.verse · device
Turn this into a guided course
Add User Options 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.