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 › Input & Controls · Up to Fortnite · Input & Controls · 2 of 31 in Input & Controls
Browse Fortnite

How Input, Parameters, and Arguments Work in Verse

Input is information added to a program and used by code to make changes.

The function examples given in the previous lesson didn’t need any input:

GetNumberOfMousetrapsYouCanAfford() : int

GetNumberOfMousetrapsYouCanAfford() : int

Copy full snippet(1 line long)

You know this because the parentheses () in the function signature above are empty.

Parameters

You can define the input a function needs by adding a parameter to the function signature.

A parameter is a constant that’s declared in the function signature between the parentheses. When a parameter is set, you can use it in the body of the function.

The syntax for a function that includes a parameter looks like this:

|  |  |
| --- | --- |
|  | name(parameter : type) : type = |
|  | codeblock |

name(parameter : type) : type = codeblock

Copy full snippet(2 lines long)

In the following example, CoinsPerMousetrap is now a parameter for the function BuyMousetrap():

|  |  |
| --- | --- |
|  | var Coins : int = 500 |
|  |  |
|  | BuyMousetrap(CoinsPerMousetrap : int) : void = |
|  | set Coins = Coins - CoinsPerMousetrap |
|  | Print("Mousetrap bought! You have {Coins} coins left.") |

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 Input & Controls · 2 of 31
    Prev
    basic storm controller
    Next
    basics of writing code 9 failure and control flow in verse
    Browse all files in this folder (A–Z)
    Next up
    • Lesson 8: Practice Time!
    Related topics
    • Functions In Verse Verse Language
    • Verse Glossary Verse Language
    • addinputmapping Input & Controls
    • Input Action Assets
    • addinputmapping Input & Controls

    Related

    Open in graph →

    Related topics

    • Functions In Verse
    • Verse Glossary
    • addinputmapping
    • Input Action
    • addinputmapping
    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