# This is a simplified representation of how the Class System works in Verse.
# In UEFN, the Class Designer device handles this automatically for you.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Playspaces }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# 1. Define the Class Structure (The Blueprint)
# This is like the Class Designer device itself.
# Note: 'int' is used here for readability; Verse uses float for health/shield values
# via the fort_character health API.
player_class := struct:
Health : float
Shields : float
# 2. Create Instances of the Class (The Specific Configurations)
# This is what you do in the Class Designer settings.
# These are module-scoped constants representing each class definition.
# Using functions instead of module-scoped constants to avoid the 'transacts' effect error.
MakeJuggernautClass() : player_class = player_class{
Health := 500.0,
Shields := 0.0
}
MakePhantomClass() : player_class = player_class{
Health := 100.0,
Shields := 200.0
}
Verse Library
verse
01 Standalone
Defines player class blueprints using structs and instantiates them for hero shooter character configurations.
verse-library/class-designer/01-standalone.verse
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.