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 · 14 of 570 in Verse Language
Browse Fortnite

Basics of Writing Code 6 Defining a Function in Verse

You learned in Lesson 5 that a function is reusable code that provides instructions for performing an action, or for creating an output based on input.

To define a function, you need three key parts: a unique identifier, the type of information to expect as its result, and what the function will do when it's called.

How to Define a Function

Function Signatures

In Lesson 3, you saw how to declare a variable or constant by naming it and giving the type of value it will use.

A function signature works in a similar way. The function signature uses a unique identifier for the function, along with the parameters that describe the input it will need, and finally, the return type for the result, or output.

Diagram of function signature

What the function actually does is defined in the code block.

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 Mar 29, 2026
    Keep exploring
    More in Verse Language · 14 of 570
    Prev
    basics of writing code 5 practice time in verse
    Next
    basics of writing code 6 practice time in verse
    Browse all files in this folder (A–Z)
    Next up
    • You learned in [Lesson 5
    • In [Lesson 3
    • The instructions in that function and any values that come out of the function determine the function **scope**.
    • Lesson 6: Practice Time!
    Related topics
    • Learn Code Basics 6 Defining A Function In Verse Verse Language
    • Verse Glossary Verse Language
    • Verse Glossary Verse Language
    • Functions In Verse Verse Language
    • Basics Of Writing Code 5 Calling Functions In Verse Verse Language

    Related

    Open in graph →

    Related topics

    • Learn Code Basics 6 Defining A Function In Verse
    • Verse Glossary
    • Verse Glossary
    • Functions In Verse
    • Basics Of Writing Code 5 Calling Functions In Verse
    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