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 › Verse Language · Up to Fortnite · Verse Language · 31 of 570 in Verse Language
Browse Fortnite

Constructor in Verse

A constructor is a special function that creates an instance of the class that it’s associated with. It can be used to set initial values for the new object.

You can add a constructor for a class by adding the constructor specifier on the function name. Instead of specifying a return type on the function, the function is assigned the class name followed by any initialization of fields. A class can have more than one constructor.

Verse ```
Verse MakeOtherClass1<constructor>(Arg1 : int) := class1: let: OnePlusArg1 := Arg1 + 1 block: DoSomething(OnePlusArg1) Property1 := OnePlusArg1 block: Expand code Copy full snippet(11 lines long) Adding variables and executing code in the constructor: You can execute expressions within a constructor with the block expression, and introduce new variables with the keyword let.
Verse ```

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 Feb 10, 2026
    Keep exploring
    More in Verse Language · 31 of 570
    Prev
    constants and variables in verse
    Next
    container types in verse
    Browse all files in this folder (A–Z)
    Next up
    • A constructor is a special [function
    • more than one constructor. |
    Related topics
    • Constructor In Verse Verse Language
    • Verse Language Quick Reference Verse Language
    • Custom Countdown Timer In Verse Devices
    • Persistent Player Statistics In Unreal Editor For Fortnite Player
    • Persistent Player Statistics In Unreal Editor For Fortnite Player

    Related

    Open in graph →

    Linked docs

    • Verse Glossary

    Related topics

    • Constructor In Verse
    • Verse Language Quick Reference
    • Custom Countdown Timer In Verse
    • Persistent Player Statistics 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