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

Representing Command Data Structures

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 documentation

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

Guided course

Add this to your free study plan — we’ll suggest related material and stitch it into one compile-checked lesson.

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)

Source

Epic Games documentation

View original

Last updated 2026-07-26T11:56:40.940951+00:00

VerseIsland· an archipelago of Verse & UEFN knowledge
🗺️ Island atlasLearnGuidesHistoryAbout & PressSources & LicensingPrivacy PolicyTermsStatus

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