Spawning Chaos: How to Create Explosions with Verse
Tutorial beginner

Spawning Chaos: How to Create Explosions with Verse

Updated beginner

Spawning Chaos: How to Create Explosions with Verse

You've seen the fireworks, right? That satisfying whoosh followed by a burst of colorful sparks that linger in the air before fading out. In Fortnite, that's not magic—it's Particles. And in Verse, we don't just "place" them; we tell the game engine to spawn them dynamically, frame by frame, based on logic.

Think of a particle system like a loot drop. The loot doesn't just appear out of nowhere; it's triggered by an event (opening a chest). Similarly, particles are tiny visual effects (sparks, smoke, rain) that are "spawned" into the game world by code. In this tutorial, we're going to build a simple "Revenge Spark" system. When you get eliminated, instead of just fading to black, a burst of angry red sparks explodes from your last known position. It's cheap, it's chaotic, and it's entirely code-driven.

What You'll Learn

  • Entities vs. Components: How to organize your code so the game knows what is exploding and how it explodes.
  • Spawning Logic: How to trigger an effect only when a specific event happens (like death).
  • Particle System Basics: Understanding that particles are just tiny, temporary sprites with lifetimes.

How It Works

Before we touch a single line of Verse, let's map this to something you already know: The Storm.

When the storm closes in, it doesn't just be storm. It's an active process. It has a Trigger (the timer), an Action (damage + visual effect), and a State (how long it lasts).

In UEFN/Verse, we handle visual effects like this:

  1. The Entity (The Container): Think of this like the Battle Bus. It's the object that exists in the world. In our case, it's a simple invisible trigger zone or a prop that detects when you die.
  2. The Component (The Behavior): This is like the Item Granter on a chest. The chest (Entity) has a component attached to it that says, "When opened, give this item." Here, we attach a Particle System Component to our entity. This component holds the settings: What does it look like? How long does it last? How fast does it move?
  3. The Spawn Event: This is the Elimination Notification. It's the moment the game says, "Player X is out." We hook our code into this moment. When the notification fires, we tell the Particle System Component to "Spawn" its effect.

Why Verse?

In the old editor, you'd drag a particle effect onto the map and hope it looks right. With Verse, you can make the particles react to the player. Did they use a shield? Make blue sparks. Did they use a shotgun? Make big, loud orange sparks. We are moving from "static decoration" to "dynamic gameplay feedback."

Let's Build It

We are going to create a script that listens for your player's death and spawns a burst of red particles at that location.

Prerequisites:

  1. Open UEFN.
  2. Create a new Verse script (or add to an existing one).
  3. You need a Particle Effect asset in your project. If you don't have one, go to the Content Browser > Effects > Particles and grab a simple one like P_Firework or P_Smoke. Let's assume you've named your particle asset MyExplosionEffect.

Here is the code. Copy this into your Verse script.

# We need these basic tools to talk to the game world
using { /Verse.org/Simulation }
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Game }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /UnrealEngine.com/Temporary/Diagnostics }

# This is our main script. Think of it as the "Game Rule" container.
# It holds the logic for what happens when players interact with the world.
my_particle_script := class(creative_device):

    # STEP 1: Define the "Loot" (The Particle Effect)
    # In Verse, we wire up devices in the editor's Details panel.
    # Place a vfx_spawner_device on your island and assign it here.
    # Replace 'vfx_spawner_device{}' by connecting the device in the Details panel.
    # note: Verse has no raw particle_system asset type at runtime; vfx_spawner_device
    # is the real API for spawning pre-configured particle effects in UEFN.
    @editable
    explosion_effect : vfx_spawner_device = vfx_spawner_device{}

    # STEP 2: The "Trigger" (Event Listener)
    # This function runs automatically when a player is eliminated.
    # It's like the "Elimination Notification" device in the editor, but in code.
    on_player_eliminated(result : elimination_result) : void =
        # Get the agent (player) who was eliminated.
        eliminated_agent := result.EliminatedCharacter

        # Get the location of the player who just died.
        # This is like grabbing the coordinates of the loot crate.
        if (fort_char := eliminated_agent.GetFortCharacter[]):
            death_location : vector3 := fort_char.GetTransform().Translation

            # STEP 3: The "Spawn" (The Action)
            # We move the vfx_spawner_device to the death location, then activate it.
            # This tells the particle system to play its effect where the player died,
            # not at the center of the map.
            # note: vfx_spawner_device does not have a runtime SetActorLocation API;
            # placing the device near expected death zones in the editor and calling
            # Enable() is the standard real workflow. TeleportTo[] is used here to
            # reposition it at runtime, which is the closest real API available.
            if (fort_char_device := explosion_effect.GetSelfAsActor[]):
                fort_char_device.TeleportTo[death_location, IdentityRotation()]
            explosion_effect.Enable()

    # This is the entry point. It sets up the listeners.
    # It's like hitting "Play" in the editor.
    OnBegin<override>() <suspends> : void =
        # We need to listen to the Game Mode for elimination events.
        # This is the "brain" of the game.
        # note: GetPlayspace() is the real Verse API that replaces GetGameMode().
        PlaySpace := GetPlayspace()

        # Connect our function to the elimination event.
        # When a player dies, 'on_player_eliminated' runs.
        PlaySpace.EliminationEvent().Subscribe(on_player_eliminated)

Walkthrough: What Just Happened?

  1. my_particle_script := class(creative_device):: This creates our main container. In Fortnite terms, this is like placing a Game Rule device in your island. It's the boss that controls everything else.
  2. @editable explosion_effect : vfx_spawner_device: This is a Variable. A variable is just a box where we store information. Here, we're storing a reference to our visual effect device. It's like naming a prop "Red Barrel" so you can find it later. If you didn't have this line, the game wouldn't know which explosion to show.
  3. on_player_eliminated: This is a Function. A function is a set of instructions that runs when called. Think of it like a Switch. When the switch is flipped (a player dies), this function turns on.
  4. fort_char.GetTransform().Translation: This is the GPS. We are asking the game, "Where exactly is the player right now?" We need this coordinate so the explosion doesn't happen in the void.
  5. explosion_effect.Enable(): This is the Item Granter. It takes the stored effect device and "grants" it to the world, triggering the particle burst. The position is set beforehand so the explosion happens exactly where the player died.

Try It Yourself

The code above creates a basic explosion. But it's a bit boring—it's always red, always the same size, and always happens at the same speed.

Challenge: Modify the script to make the explosion scale based on how much health the player had left.

  • If the player had full health (100 HP), spawn a small spark (scale 0.5).
  • If the player was low health (10 HP), spawn a huge explosion (scale 2.0).

Hint: You can get the player's health using fort_char.GetHealth(). Use an if/else statement to check the health value and change which pre-configured vfx_spawner_device you activate — one set up in the editor as a small burst, one as a large explosion.

Recap

  • Particles are tiny visual effects that are "spawned" into the world.
  • Variables store references to your assets (like your particle effect device).
  • Functions are blocks of code that run in response to events (like player death).
  • Spawning is the act of triggering a visual effect at a specific location in the game world.

You've just moved beyond static decorations. You're now creating dynamic, reactive visual feedback. Next time you're eliminated, you'll know exactly how to make it look epic.

References

  • https://dev.epicgames.com/documentation/en-us/uefn/building-the-firework-head-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite/2-building-the-firework-head-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/uefn/making-the-second-firework-explosion-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite/creating-fireworks-5-making-the-second-firework-explosion-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite/creating-fireworks-4-making-the-first-firework-explosion-in-unreal-editor-for-fortnite

Get the complete code — free

You've read the full walkthrough. The complete, copy-paste-ready Verse solution is free for members — sign in to unlock it.

Free with your BrainDead.TV / BrainDeadGuild Discord account. The walkthrough above is always free.

Verse source files

Turn this into a guided course

Add Particle Spawn 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