VerseIsland
FeedLearnLeaderboardGuidesReferenceExploreSearchDocsVerse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Browse Community Snippets›Verse Language·Up to Community Snippets · Verse Language·17 of 114 in Verse Language

Verse Programming Basics

31,610 Views

Report

  • using { /Fortnite.com/Devices }
    using { /Verse.org/Simulation }
    
    # A Verse-authored creative device that can be placed in a level
    hello_world_device := class(creative_device):
    
        # Runs when the device is started in a running game
        OnBegin<override>()<suspends>:void=
            # TODO: Replace this with your code
    
            
            # Welcome to the game of mice and coins! Let's start with 5 gold coins.
            var goldcoins: int = 5
    
            # Display the starting amount of gold coins to the player with a witty message.
            Print("Welcome to the game of mice and coins! You're starting with {goldcoins} shiny gold pieces!")
    
            # Now, let's set up the variables for the game: the number of mice caught and the additional gold pieces they're worth.
            var micecaught: int = 0
            var additionalgold: int = 1
    
            # If the player catches a mouse, they get additional gold coins. If not, they lose some. Simple, right?
            if (micecaught > 0):
                set goldcoins = goldcoins + additionalgold
                Print("You caught a mouse! Congrats! You now have {goldcoins} gold coins! Keep it up!")
            else:
                set goldcoins = goldcoins - additionalgold
                Print("Oh no, a mouse escaped! You now have {goldcoins} gold coins. Better luck next time, champ!")
    

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 Verse Language · 17 of 114
Prev
fortnite sort a map with key value
Next
fortnite tnt tag gamemode script game

Source

Epic Games documentation

View original

Last updated 2026-07-26T12:51:35.164060+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