Build a Healing Station with Verse
Tutorial beginner

Build a Healing Station with Verse

Updated beginner

Build a Healing Station with Verse

Do you hate running out of health in the middle of a battle? Let’s fix that! We will build a special healing station. When you step on it, you get health and shields back. This is called a Powerup. A Powerup is an item that gives you something good. We will use Verse to make it happen.

What You'll Learn

  • What a Device is in Fortnite Creative.
  • How to use Contextual Filtering to find options.
  • How to write Verse code for a Health Powerup.
  • How to connect devices using Events.

How It Works

Imagine you are playing a game. You see a glowing orb on the ground. You walk over it. Poof! Your health goes back up. That orb is a device. In Fortnite, we call these Devices. Devices are like magic boxes. They do things when you tell them to.

One type of device is the Health Powerup. It gives you health or shields. Shields are like an extra layer of armor. They break first. Health is your real life bar.

Sometimes, the menu for a device can be messy. It has too many buttons. Epic Games uses a trick called Contextual Filtering. This means the menu hides buttons you don’t need. It only shows what matters. This keeps things clean.

We will use Verse to tell the device when to work. Verse is our instruction manual. We will say, "When a player steps here, give them health." Simple, right?

Let's Build It

First, open your island in UEFN. We need two things.

  1. A Visual Effect Powerup. This is the glowing orb.
  2. A Health Powerup. This is the magic box that heals.

We will place them close together. Now, we write the code. This code connects the orb to the healer.

# This is a comment. It helps us remember what this code does.

# We make a new script. This is our magic spell.
My_Healing_Script := script() override {
    # This runs when the island starts.
    On_Start := func() override {
        # We find our glowing orb device.
        # It is named "Glowing_Orb" in our scene.
        orb := Scene.Find_actor_by_name("Glowing_Orb")
        
        # We find our healing box device.
        # It is named "Healer_Box" in our scene.
        healer := Scene.Find_actor_by_name("Healer_Box")
        
        # Now we connect them!
        # When the orb is picked up...
        orb.Pickup_Event.Subscribe(func(player : Player) {
            # ...give the player health via the healer.
            # We use the Heal function.
            healer.Trigger(player)
        })
    }
}

Let’s look at this code closely.

Line 1: # This is a comment. Comments are notes for humans. The computer ignores them. They help you remember your plan.

Line 3: My_Healing_Script := script() override { This starts our script. A script is a list of instructions. We are creating a new one.

Line 5: On_Start := func() override { This is an Event. An Event is a moment in time. On_Start happens when the game begins. We put our setup code here.

Line 8-9: orb := Scene.Find_actor_by_name("Glowing_Orb") Here we find our device. Scene is the whole island. Actor is any object in the scene. We find the orb by its name. You must name your devices in the editor!

Line 12-13: healer := Scene.Find_actor_by_name("Healer_Box") We find the healer box the same way. Make sure the names match exactly.

Line 16: orb.Pickup_Event.Subscribe(...) This is the magic link. Pickup_Event happens when someone grabs the orb. Subscribe means we are listening for that moment.

Line 19: healer.Trigger(player) When the orb is grabbed, we trigger the healer. The player gets healed!

Try It Yourself

Now it’s your turn to build!

  1. Place a Visual Effect Powerup on the ground. Name it "Star".
  2. Place a Health Powerup nearby. Name it "Healer".
  3. Open the Verse editor. Create a new script.
  4. Copy the code above. Change "Glowing_Orb" to "Star". Change "Healer_Box" to "Healer".
  5. Play your island!

Hint: If it doesn’t work, check the names. Are they spelled exactly the same? Check the capital letters too!

Recap

You built a healing station! You learned about Devices. You learned about Events. You used Verse to connect them. You can make anything now. Try making a shield station next!

References

  • https://dev.epicgames.com/documentation/en-us/fortnite/using-health-powerup-devices-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-health-powerup-devices-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/create-a-dungeon-crawler-game-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/create-a-dungeon-crawler-game-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/fortnite-glossary

Verse source files

Turn this into a guided course

Add using-health-powerup-devices-in-fortnite-creative 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.

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.

Comments

    Sign in to vote, comment, or suggest an edit. Sign in