VerseIsland
Feed Learn Leaderboard Guides Reference Explore Search Docs Verse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Verse Library › Materials/VFX
Browse Verse Library

Library

Devices 634
  • Devices166
  • Triggers & Logic117
  • UI & HUD41
  • Audio39
  • Items & Inventory29
  • Events28
  • Scoring & Objectives24
  • Spawning19
  • Classes & Interfaces18
  • Game Modes16
  • Props & Meshes13
  • Variables & Mutability12
  • Modules & Structure11
  • Player Management11
  • Round Flow9
  • Tutorials7
  • Animation6
  • Functions6
  • Getting Started6
  • Teams & Classes6
  • Concurrency5
  • Debugging5
  • NPCs & AI5
  • VFX & Particles5
  • Cameras4
  • Arrays & Maps3
  • Control Flow3
  • Structs & Enums3
  • Syntax & Types3
  • Cinematics2
  • Persistence2
  • Scene Graph2
  • Building1
  • Other1
  • Physics1
  • Publishing & Islands1
  • Reference1
  • Templates1
  • Vehicles1
  • Weapons1
Verse Language 257
  • Control Flow35
  • Functions27
  • Arrays & Maps25
  • Classes & Interfaces22
  • Variables & Mutability22
  • Concurrency21
  • Syntax & Types18
  • Modules & Structure12
  • Debugging8
  • Devices8
  • Events7
  • Player Management6
  • Structs & Enums6
  • Triggers & Logic6
  • Failure & Options4
  • Game Modes4
  • UI & HUD4
  • Getting Started3
  • Round Flow3
  • Scene Graph3
  • Spawning3
  • Reference2
  • Templates2
  • VFX & Particles2
  • Animation1
  • Best Practices1
  • Cameras1
  • Props & Meshes1
Materials/VFX 154
  • Triggers & Logic27
  • UI & HUD17
  • Devices16
  • VFX & Particles16
  • Game Modes8
  • Props & Meshes8
  • Scoring & Objectives8
  • Items & Inventory7
  • Arrays & Maps5
  • Events4
  • Animation3
  • Cinematics3
  • Classes & Interfaces3
  • Control Flow3
  • Modules & Structure3
  • Round Flow3
  • Spawning3
  • Concurrency2
  • Functions2
  • Reference2
  • Scene Graph2
  • Syntax & Types2
  • Variables & Mutability2
  • Getting Started1
  • Persistence1
  • Player Management1
  • Structs & Enums1
  • Tutorials1
General 153
  • Devices22
  • Events20
  • Triggers & Logic20
  • Classes & Interfaces10
  • Variables & Mutability8
  • Round Flow6
  • Scoring & Objectives6
  • UI & HUD6
  • Functions5
  • Player Management5
  • Game Modes4
  • Getting Started4
  • Props & Meshes4
  • Control Flow3
  • Syntax & Types3
  • VFX & Particles3
  • Arrays & Maps2
  • Best Practices2
  • NPCs & AI2
  • Other2
  • Physics2
  • Scene Graph2
  • Spawning2
  • Structs & Enums2
  • Tutorials2
  • Building1
  • Cameras1
  • Cinematics1
  • Failure & Options1
  • Items & Inventory1
  • Teams & Classes1
Player 133
  • Player Management22
  • Teams & Classes18
  • Classes & Interfaces12
  • Devices11
  • Triggers & Logic9
  • Events8
  • Persistence7
  • Arrays & Maps6
  • Game Modes5
  • Round Flow4
  • Functions3
  • Getting Started3
  • Items & Inventory3
  • Modules & Structure3
  • Concurrency2
  • Control Flow2
  • Debugging2
  • Props & Meshes2
  • Scoring & Objectives2
  • Spawning2
  • Structs & Enums2
  • Physics1
  • Reference1
  • UI & HUD1
  • Variables & Mutability1
  • Weapons1
Building & Props 131
  • Variables & Mutability15
  • Props & Meshes13
  • Triggers & Logic13
  • Classes & Interfaces10
  • Devices10
  • UI & HUD10
  • Events7
  • Teams & Classes7
  • Functions6
  • Animation5
  • Building5
  • VFX & Particles5
  • Structs & Enums4
  • Control Flow3
  • Game Modes3
  • Items & Inventory3
  • Round Flow3
  • Scene Graph3
  • Concurrency2
  • Reference2
  • Arrays & Maps1
  • Modules & Structure1
NPCs & AI 76
  • NPCs & AI34
  • Spawning7
  • Animation6
  • Variables & Mutability5
  • Classes & Interfaces3
  • Debugging3
  • Game Modes3
  • UI & HUD3
  • Audio2
  • Concurrency2
  • Props & Meshes2
  • Devices1
  • Functions1
  • Getting Started1
  • Reference1
  • Triggers & Logic1
  • VFX & Particles1
Spawning 73
  • Spawning31
  • Concurrency6
  • Events6
  • Vehicles5
  • Player Management4
  • Props & Meshes4
  • Items & Inventory3
  • Teams & Classes3
  • Devices2
  • Functions2
  • Round Flow2
  • Scene Graph2
  • Control Flow1
  • Scoring & Objectives1
  • Triggers & Logic1
Cinematics 71
  • Cameras17
  • Cinematics15
  • Devices11
  • Audio5
  • Animation4
  • Triggers & Logic4
  • Functions2
  • Game Modes2
  • Templates2
  • UI & HUD2
  • Classes & Interfaces1
  • Concurrency1
  • Control Flow1
  • Debugging1
  • Items & Inventory1
  • Modules & Structure1
  • Scene Graph1
UI 57
  • UI & HUD34
  • Devices5
  • Scoring & Objectives4
  • Classes & Interfaces3
  • Round Flow2
  • Scene Graph2
  • Arrays & Maps1
  • Functions1
  • Getting Started1
  • Reference1
  • Structs & Enums1
  • Triggers & Logic1
  • Variables & Mutability1
Scene Graph 40
  • Scene Graph9
  • Items & Inventory8
  • Classes & Interfaces3
  • Events3
  • Props & Meshes3
  • Reference2
  • Arrays & Maps1
  • Building1
  • Control Flow1
  • Debugging1
  • Functions1
  • Modules & Structure1
  • Player Management1
  • Structs & Enums1
  • Syntax & Types1
  • Triggers & Logic1
  • UI & HUD1
  • VFX & Particles1
Vehicles 38
  • Spawning12
  • Devices7
  • Vehicles7
  • Props & Meshes4
  • Game Modes2
  • Failure & Options1
  • Items & Inventory1
  • Reference1
  • Teams & Classes1
  • Tutorials1
  • VFX & Particles1
Tutorials 37
  • Game Modes6
  • Triggers & Logic5
  • Classes & Interfaces4
  • Events4
  • Props & Meshes3
  • Building2
  • Devices2
  • Items & Inventory2
  • Scoring & Objectives2
  • Animation1
  • Arrays & Maps1
  • Cameras1
  • Concurrency1
  • Physics1
  • Player Management1
  • Structs & Enums1
Weapons 30
  • Devices6
  • Game Modes6
  • Weapons4
  • Items & Inventory3
  • Scoring & Objectives3
  • Spawning2
  • Teams & Classes2
  • Best Practices1
  • Classes & Interfaces1
  • Functions1
  • Triggers & Logic1
Items 28
  • Items & Inventory23
  • Devices2
  • Triggers & Logic2
  • Spawning1
Assets 20
  • Modules & Structure6
  • Arrays & Maps3
  • Functions3
  • Scene Graph2
  • Best Practices1
  • Devices1
  • Events1
  • Failure & Options1
  • Physics1
  • Variables & Mutability1
Animation 19
  • Animation9
  • Variables & Mutability4
  • Devices1
  • Props & Meshes1
  • Reference1
  • Scene Graph1
  • Syntax & Types1
  • Tutorials1
Release Notes 17
  • Classes & Interfaces5
  • Modules & Structure3
  • Concurrency2
  • Control Flow2
  • Variables & Mutability2
  • Debugging1
  • Devices1
  • Items & Inventory1
Input & Controls 16
  • Functions3
  • Control Flow2
  • Syntax & Types2
  • UI & HUD2
  • Animation1
  • Arrays & Maps1
  • Cinematics1
  • Debugging1
  • Devices1
  • Events1
  • Reference1
Publishing 8
  • Control Flow5
  • Arrays & Maps1
  • Devices1
  • Syntax & Types1
Audio 7
  • Audio5
  • UI & HUD2
Landscape 7
  • Other4
  • VFX & Particles2
  • Scene Graph1
Persistence 6
  • Structs & Enums2
  • Items & Inventory1
  • Persistence1
  • Publishing & Islands1
  • Variables & Mutability1
Physics 5
  • Syntax & Types3
  • Classes & Interfaces1
  • Devices1
Creator Economy 3
  • Modules & Structure1
  • Other1
  • Publishing & Islands1
Discovery 3
  • Devices1
  • NPCs & AI1
  • Structs & Enums1
Editor & Project 3
  • Other1
  • Props & Meshes1
  • Tutorials1

Adding Verse To Your Creative Toolbelt

Module — 5 files
These files compile together (same module folder).
file_1.verse
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }

# A Verse-authored creative device that can be placed in a level.
# This device is the game manager.
caterpillar_commander<public> := class(creative_device):

    @editable
    Character<private>:game_character = game_character{}

    @editable
    Gameboard<private>:gameboard = gameboard{}

    @editable
    GameLoopWait<private>:float = 1.75

    UIManager<private>:ui_manager = ui_manager{}

    # Runs when the device is started in a running game.
    OnBegin<override>()<suspends>:void=
        Setup()
        GameLoop()

    Setup<private>():void=
        Players := GetPlayspace().GetPlayers()
        
        # Set first player as damager for character.
        MaybePlayer:?player = option{Players[0]}
        Character.SetPlayerAsDamageInstigator(MaybePlayer)

        for (Player : Players):
            UIManager.Create(Player)
            UIManager.Draw(Player)

    Cleanup<private>():void=
        Playspace := GetPlayspace()

        for (Player : Playspace.GetPlayers()):
            UIManager.Remove(Player)

    GameLoop<private>()<suspends>:void=
        CharacterStart := Gameboard.GetCharacterStart()
        if (Character.MoveToStart[CharacterStart]):
            race:
                loop:
                    Command := UIManager.WaitForPlayerSelection()
                    Execute(Character, Gameboard.TileSize, Command)
                    Sleep(GameLoopWait)
                Gameboard.WaitForEndGoal()
        Cleanup()
file_2.verse
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/SpatialMath }

# Type of commands to give the game character
command<internal> := enum:
    Forward
    TurnRight
    TurnLeft
    None

ToString<internal>(Command: command):string =
    case(Command):
        command.Forward => "Forward"
        command.TurnRight => "TurnRight"
        command.TurnLeft => "TurnLeft"
        command.None => "None"

Execute<internal>(Character:game_character, TileSize:vector3, Command:command)<suspends>:void=
    Print("{Command}")
    case(Command):
        command.Forward =>
            Character.Forward(TileSize)
        command.TurnRight =>
            Character.TurnRight()
        command.TurnLeft =>
            Character.TurnLeft()
        _ =>
            Print("Default command case")
file_3.verse
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }

game_character<internal> := class<concrete>:
    MoveToStart<public>(Location:vector3, Rotation:rotation)<decides><transacts>:void=
        InGameRep.TeleportTo[Location, Rotation]

    Forward<public>(TileSize:vector3)<suspends>:void=
        var Transform:transform = InGameRep.GetTransform()
        LocalForward := Transform.Rotation.GetLocalForward()

        if(Abs(LocalForward.X) >= Abs(LocalForward.Y)):
            set Transform.Translation.Y += Sgn(LocalForward.X) * TileSize.X
        else:
            set Transform.Translation.X += -Sgn(LocalForward.Y) * TileSize.Y
            
        InGameRep.MoveTo(Transform, MoveDuration)
        Damage()

    TurnRight<public>()<suspends>:void=
        var Transform:transform = InGameRep.GetTransform()
        set Transform.Rotation = Transform.Rotation.ApplyLocalRotationZ(DegreesToRadians(90.0))
        InGameRep.MoveTo(Transform, MoveDuration)

    TurnLeft<public>()<suspends>:void=
        var Transform:transform = InGameRep.GetTransform()
        set Transform.Rotation = Transform.Rotation.ApplyLocalRotationZ(DegreesToRadians(-90.0))
        InGameRep.MoveTo(Transform, MoveDuration)

    SetPlayerAsDamageInstigator<public>(InPlayer:?player):void=
        set DamageInstigator = InPlayer

    @editable
    InGameRep<private>:creative_prop = creative_prop{}

    @editable
    Damager<private>:explosive_device = explosive_device{}

    @editable
    MoveDuration<private>:float = 0.5

    var DamageInstigator<private>:?agent = false

    Damage<private>():void=
        if (Instigator := DamageInstigator?):
            Damager.Explode(Instigator)
            Damager.Reset()
file_4.verse
using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Simulation }
using { /Verse.org/Simulation/Tags }

gameboard<internal> := class<concrete>:
    # The size of each tile on the gameboard. By default the default Fortnite
    # tile size of 512x512x384.
    @editable
    TileSize<public>:vector3 = vector3{X:=512.0, Y:=512.0, Z:=384.0}

    WaitForEndGoal<public>()<suspends>:void=
        EndGoal.TriggeredEvent.Await()

    GetCharacterStart<public>():tuple(vector3, rotation)=
        (CharacterStart.Translation, CharacterStart.Rotation)
    
    @editable
    CharacterStart<private>:transform = transform{}

    # End position goal for the character
    @editable
    EndGoal<private>:trigger_device = trigger_device{}
file_5.verse
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/UI }
using { /UnrealEngine.com/Temporary/UI }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Colors }

ui_manager<internal> := class:
    Create<public>(Player:player):void=
        # Command Buttons
        ButtonForward:button_regular = button_regular:
            DefaultText := ForwardText
        ButtonTurnRight:button_regular = button_regular:
            DefaultText := TurnRightText
        ButtonTurnLeft:button_regular = button_regular:
            DefaultText := TurnLeftText

        ButtonForward.OnClick().Subscribe(OnForwardSelected)
        ButtonTurnRight.OnClick().Subscribe(OnTurnRightSelected)
        ButtonTurnLeft.OnClick().Subscribe(OnTurnLeftSelected)

        # Canvas represents the full screen.
        # Verse UI is hierarchical, so nest relevant elements together.
        # Appears in lower middle of screen
        ButtonsCanvas := canvas:
            Slots := array:
                canvas_slot:
                    Anchors := anchors:
                        Minimum := vector2{X := 0.5, Y := 1.0}
                        Maximum := vector2{X := 0.5, Y := 1.0}
                    Offsets := margin:
                        Top    := 0.0
                        Left   := 0.0
                        Right  := 0.0
                        Bottom := 0.0
                    Alignment := vector2:
                        X := 0.5
                        Y := 1.0
                    SizeToContent := true
                    Widget := stack_box:
                        Orientation := orientation.Horizontal
                        Slots := array:
                            stack_box_slot:
                                Widget := ButtonForward
                            stack_box_slot:
                                Widget := ButtonTurnRight
                            stack_box_slot:
                                Widget := ButtonTurnLeft

        if (set CanvasPerPlayer[Player] = ButtonsCanvas):
            
    # Adds the buttons to the screen for this player.
    Draw<public>(Player:player):void=
        if:
            PlayerUI := GetPlayerUI[Player]
            Canvas := CanvasPerPlayer[Player]
        then:
            PlayerUI.AddWidget(Canvas, player_ui_slot{InputMode := ui_input_mode.All})

    # Removes the buttons from the screen for this player.
    Remove<public>(Player:player):void=
        if:
            PlayerUI := GetPlayerUI[Player]
            Canvas := CanvasPerPlayer[Player]
        then:
            PlayerUI.RemoveWidget(Canvas)

    # Waits for the player to select one of the commands.
    # Result is the command the player selected.
    WaitForPlayerSelection<public>()<suspends>:command=
        CommandEvent.Await()

    var CanvasPerPlayer<private>:[player]canvas = map{}
    CommandEvent<private>:event(command) = event(command){}

    ForwardText<private><localizes>:message = "Forward"
    TurnRightText<private><localizes>:message = "Turn Right"
    TurnLeftText<private><localizes>:message = "Turn Left"

    # Signal the turn left command when player selects turn left in UI.
    OnTurnLeftSelected<private>(Message:widget_message):void=
        CommandEvent.Signal(command.TurnLeft)

    # Signal the turn right command when player selects turn right in UI.
    OnTurnRightSelected<private>(Message:widget_message):void=
        CommandEvent.Signal(command.TurnRight)
    
    # Signal the forward command when player selects forward in UI.
    OnForwardSelected<private>(Message:widget_message):void=
        CommandEvent.Signal(command.Forward)
Sign in to download module

Copy-paste each file above is always free.

Comments

    Sign in to vote, comment, or suggest an edit. Sign in
    📄
    Source
    @Orientation
    Epic Games Community
    @Orientation

    Created by a member of the Epic Games community. Rights remain with the original author, under Epic's community content terms. Terms ↗

    View original Sources & licensing
    Request removal
    Last updated Jun 23, 2026
    Verse module (5 files)
    Compiles · verified Jun 25, 2026

    Download the full module (zip) from the code panel above.

    Keep exploring
    More in Verse Language · 79 of 106
    Prev
    stapcyborg paradox kit verse snippets
    Next
    fortnite clock hh mm ss
    Related topics
    • Programming With Verse In Unreal Editor For Fortnite Verse Language
    • Learn Programming With Verse In Unreal Editor For Fortnite Verse Language
    • Learn Programming With Verse In Unreal Editor For Fortnite Verse Language
    • Stronghold 03 Add Verse Script To Devices In Unreal Editor For Fortnite Devices
    • Stronghold 03 Add Verse Script To Devices In Unreal Editor For Fortnite Devices

    Related

    Open in graph →

    Related topics

    • Programming With Verse In Unreal Editor For Fortnite
    • Learn Programming With Verse In Unreal Editor For Fortnite
    • Learn Programming With Verse In Unreal Editor For Fortnite
    • Stronghold 03 Add Verse Script To Devices In Unreal Editor For Fortnite
    • Stronghold 03 Add Verse Script To Devices In Unreal Editor For Fortnite
    VerseIsland · an archipelago of Verse & UEFN knowledge
    🗺️ Island atlas Learn Guides History About & Press Sources & Licensing Status

    Not affiliated with Epic Games. Fortnite, UEFN, Unreal Engine, and Verse are trademarks of Epic Games, Inc. Content is attributed to its source — see Sources & Licensing.

    🦜

    Scout · your island guide

    The Isle of Verse