VerseIsland
Feed Learn Leaderboard Guides Reference Explore Search Docs Verse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Fortnite Guides › Tutorials · Up to Fortnite Guides · Tutorials · 8 of 11 in Tutorials
Browse Fortnite Guides

Representing Command Data in Verse Starter

A common pattern in programming is creating a data representation of a concept, like character commands, that you can pass around and treat as data within your code. In this minigame, commands need to be treated as data to generate from the UI interaction and pass to the character to perform.

In this project, a command is represented as an abstract class, and each specific command is a subclass of this command class, such as forward_command and turnright_command. Using an abstract class for the command means that the only valid commands are the subclasses that are not abstract. If you try to create an instance of the command class directly, you'll get an error when you try to compile your code.

Because the character commands are subclasses of the command class, you can use them anywhere the command class is expected, such as the character's ExecuteCommand() function in the previous step. The first parameter in ExecuteCommand() expects the command type, which means you can use an instance of a command subclass as the argument without issue.

Using subclasses of the command class as data for the character to perform.

You're reading a preview

The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.

Sign in with Discord — free for members Read the original at Epic Games

Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.

Comments

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

    © Epic Games. Official Epic developer documentation, shown here as a reference with a link to the original. All rights remain with Epic Games. Terms ↗

    View original Sources & licensing
    Request removal
    Last updated Jun 23, 2026
    Keep exploring
    More in Tutorials · 8 of 11
    Prev
    verse starter 03 designing levels for in unreal editor for fortnite
    Next
    verse starter 06 managing the game loop for in unreal editor for fortnite
    Browse all files in this folder (A–Z)
    Next up
    • 5. Controlling the NPC with UI
    Related topics
    • Verse Starter 04 Representing Command Data For In Unreal Editor For Fortnite Tutorials
    • Verse Starter 03 Designing Levels For In Unreal Editor For Fortnite Tutorials
    • Verse Starter 03 Designing Levels For In Unreal Editor For Fortnite Tutorials
    • Verse Starter Template In Unreal Editor For Fortnite Tutorials
    • Verse Starter Template In Unreal Editor For Fortnite Tutorials

    Related

    Open in graph →

    Related topics

    • Verse Starter 04 Representing Command Data For In Unreal Editor For Fortnite
    • Verse Starter 03 Designing Levels For In Unreal Editor For Fortnite
    • Verse Starter 03 Designing Levels For In Unreal Editor For Fortnite
    • Verse Starter Template In Unreal Editor For Fortnite
    • Verse Starter Template 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