Make Your Island Disappear: The Art of the Vanishing Act
Make Your Island Disappear: The Art of the Vanishing Act
So, you want to make a platform that vanishes when you step on it? Or maybe a loot box that disappears after you open it? In Fortnite, we call that "disappearing." In Verse, we call that Hide(). It’s the digital equivalent of a magician’s cape, but instead of pulling a rabbit out of a hat, you’re pulling a platform out of existence.
This isn’t just about making things vanish; it’s about controlling the flow of your island. If everything stays visible, your players get bored. If nothing stays visible, they get lost. Today, we’re going to learn how to toggle visibility on and off using Verse, turning static props into dynamic gameplay elements.
What You'll Learn
- Entities: Understanding that every object in your island is an "Entity" (a thing that exists in the world).
- Components: Learning that an Entity is made of smaller parts, like a "Mesh" (the visual skin).
Hide(): The command that tells the game engine to stop rendering an object.Sleep(): The timer that lets you wait before bringing something back.- Scene Graph Basics: How Verse talks to the visual layer of your island.
How It Works
To understand Hide(), you have to think about how Fortnite renders your island. When you place a wall in UEFN, you aren’t just placing a "wall." You are placing an Entity.
The Entity vs. The Mesh
Think of an Entity as a skeleton. It has a position, a rotation, and a scale. It exists in the game world mathematically. But a skeleton doesn’t look like a wall. It looks like a wireframe.
To make it look like a wall, you attach a Component to it. Specifically, a Mesh Component. This component holds the 3D model, the textures, and the colors. It’s the "skin" of the entity.
When you want to make an object disappear, you aren’t deleting the Entity (the skeleton still exists in the code, holding its position). You are simply telling the Mesh Component to stop drawing itself.
The Hide() Command
In Verse, Hide() is a method (a function that belongs to an object) that lives on the Entity. When you call Entity.Hide(), Verse goes behind the scenes, finds the Mesh Component attached to that Entity, and tells it: "Turn off."
It’s like turning off the lights in a room. The furniture (the Entity) is still there, but you can’t see it anymore (the Mesh is disabled).
Bringing It Back
If you only hide something, it stays hidden forever. That’s not a disappearing platform; that’s a broken one. To make it reappear, you need two things:
Show(): The opposite ofHide(). It tells the Mesh Component to start drawing again.Sleep(Duration): A pause. Verse is fast. If you hide something and immediately show it, it happens so fast the player won’t notice.Sleep()pauses the script for a set amount of time, letting the "disappearing" moment breathe.
Let's Build It
We are going to build a Vanishing Floor. When a player steps on it, the floor drops out from under them (hides), waits for 3 seconds, and then pops back up.
The Setup
- Open UEFN and create a new Island.
- Place a Prop (a flat square platform) in the center of your map. Let’s call it
VanishingFloor. - Add a Trigger Volume (a large box) around the floor. This will detect when a player steps on it.
- Add a Verse Script to the Trigger Volume.
The Verse Code
Here is the script. Copy this into your Verse file.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Verse }
# This script makes the floor disappear when a player steps on it.
# We attach this script to a Trigger Volume device.
VanishingFloorTrigger := class(creative_device):
# 1. The Trigger Volume itself (the device we attached this script to)
@editable
this_device: trigger_device = trigger_device{}
# 2. A reference to the floor prop we want to hide/show
# We will link this in the editor!
@editable
floor_to_hide: creative_prop = creative_prop{}
# 3. How long the floor stays hidden (in seconds)
hide_duration: float = 3.0
# This function runs when the script initializes (when the game starts)
OnBegin<override>()<suspends>: void =
# We don't need to do anything special here yet,
# but we could set up initial states.
this_device.TriggeredEvent.Await()
OnBeginOverlap()
# This function is called when a player enters the trigger volume
OnBeginOverlap()<suspends>: void =
# Great, a player stepped on us!
# 1. Hide the floor
# This tells the floor's mesh to stop rendering.
floor_to_hide.Hide()
# 2. Wait for the specified duration
# The script pauses here. The player falls through!
Sleep(hide_duration)
# 3. Bring the floor back
# This tells the floor's mesh to start rendering again.
floor_to_hide.Show()```
### Walkthrough: What’s Happening?
1. **`this_device` & `floor_to_hide`**: These are **Variables**. A variable is like a loot slot in your inventory. It holds a specific item. Here, `floor_to_hide` holds the reference to the actual 3D object in your scene. You will link this in the UEFN editor by dragging the floor prop into the variable slot in the device properties.
2. **`OnBeginOverlap`**: This is an **Event**. An event is like a storm timer. It doesn’t run continuously; it fires when a specific condition is met (in this case, when a player overlaps with the trigger).
3. **`player := overlapping_actor.AsPlayer()`**: This is a **Cast**. Imagine you find a chest. You don’t know if it’s a normal chest or a legendary chest until you open it. `AsPlayer()` tries to open the "chest" of the actor and see if it’s a player. If it is, it gives you a player object. If not, it gives you `none`.
4. **`floor_to_hide.Hide()`**: This is the magic line. It accesses the `floor_to_hide` entity and calls its `Hide()` method. Behind the scenes, Verse finds the Mesh Component and disables it. The floor vanishes.
5. **`Sleep(hide_duration)`**: This pauses the script for 3 seconds. The player is now falling. They think the floor is gone.
6. **`floor_to_hide.Show()`**: After the sleep, the script resumes. It calls `Show()` on the same entity. The Mesh Component re-enables, and the floor pops back into existence.
## Try It Yourself
The current script only works once. Once the floor comes back up, if a player steps on it again, nothing happens because the script has finished running.
**Challenge:** Make the floor reset itself so it can be triggered multiple times.
**Hint:** You don’t need to rewrite the whole script. You just need to make sure the script is ready for the next player. Think about where the `Hide()` happens. Is there a way to make the trigger volume "listen" again? Or, simpler yet, does the `OnBeginOverlap` event fire again if the player leaves and re-enters? Try adding a small `Sleep()` before the `Hide()` call to see if it changes the feel, or experiment with moving the `Hide()` logic into a loop.
Actually, here’s a better hint: The trigger volume might not fire again if the player is still "inside" it. Try making the player leave the trigger, wait a moment, and then re-enter. If that works, you’ve got a multi-use trap! If not, look up how to manually reset a trigger volume or how to use `OnEndOverlap` to prepare for the next step.
## Recap
* **Entities** are the objects in your world; **Mesh Components** are their visual skins.
* **`Hide()`** disables the Mesh Component, making the object invisible but still present in the world.
* **`Show()`** re-enables the Mesh Component, making the object visible again.
* **`Sleep()`** pauses your script, allowing you to control the timing of your disappearances.
* Always link your variables in the editor! Verse needs to know *which* entity to hide.
## References
* https://dev.epicgames.com/documentation/en-us/fortnite/create-platformer-01-disappearing-platform-on-loop-in-unreal-editor-for-fortnite
* https://dev.epicgames.com/documentation/en-us/fortnite/create-platformer-03-building-your-platformer-with-prefabs-in-unreal-editor-for-fortnite
* https://dev.epicgames.com/documentation/en-us/uefn/creating-your-own-component-using-verse-in-unreal-editor-for-fortnite
* https://dev.epicgames.com/documentation/en-us/fortnite/creating-your-own-component-using-verse-in-unreal-editor-for-fortnite
* https://dev.epicgames.com/documentation/en-us/uefn/creating-your-own-verse-component-in-unreal-editor-for-fortnite
Verse source files
- 01-device.verse · device
Turn this into a guided course
Add Hide the entity. 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.