Verse Library verse

01 Snippet

Core device managing Verse Commander minigame flow, board transitions, UI interaction, and NPC spawning.

extracted-snippets/documentation/fortnite/verse-starter-06-managing-the-game-loop-for-in-unreal-editor-for-fortnite/01-snippet.verse

# Source URL: https://dev.epicgames.com/documentation/fortnite/verse-starter-06-managing-the-game-loop-for-in-unreal-editor-for-fortnite
# Local doc:  epic-docs/documentation/fortnite/verse-starter-06-managing-the-game-loop-for-in-unreal-editor-for-fortnite.md
# A Verse-authored creative device that can be placed in a level
verse_commander_minigame := class(creative_device):

    # The HUD Controller device for the minigame.
    @editable
    HUDController<private>:hud_controller_device = hud_controller_device{}

    # The button that starts the minigame.
    @editable
    PlayVerseCommanderButton:button_device = button_device{}

    # The NPC spawner that spawns the NPC used in the minigame.
    @editable
    NPCSpawner:npc_spawner_device = npc_spawner_device{}

    # An array of gameboards that the user can customize in the editor.
    # Each element in this array is a level that the character has to complete.
    @editable
    var Gameboards<private>:[]gameboard = array{}

    # The cinematic sequence used to show off design billboards.
    @editable
    Cinematic:billboard_cinematic = billboard_cinematic{}

    # A variable to track which gameboard the character is currently on.
    var CurrentBoard<private>:int = 0

    # Whether this is the first time a gameboard has been played. Used to know when to play

Sign in free to read the full source 🌴

This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.

Sign in with Discord

Comments

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