VerseIsland
Feed Learn Leaderboard Guides Explore Search Docs Verse Library
Sign in
Feed Learn Leaderboard Guides Explore Search Docs Verse Library
Fortnite › Verse Language · Up to Fortnite · Verse Language · 55 of 570 in Verse Language
Browse Fortnite

Logic in Verse

Verse uses logic as the type for Boolean values, which means logic only has two possible values: true and false.

Both true and false are logic literals when you use them in Verse code.

The following is an example of how to create a logic variable named TargetLocked, initialized with the logic literal false:

var TargetLocked : logic = false

var TargetLocked : logic = false

Copy full snippet(1 line long)

Logic Operations

The logic type supports query operations and comparison operations.

Query

Query expressions use the operator ? (query) and check if a logic value is true. Otherwise, the expression fails if the logic value is false.

|  |  |
| --- | --- |
|  | # Determine whether to show the target-locked icon if a target is locked |
|  | if (TargetLocked?): |
|  | ShowTargetLockedIcon() |

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 8, 2026
    Keep exploring
    More in Verse Language · 55 of 570
    Prev
    linked lists in verse
    Next
    loop and break in verse
    Browse all files in this folder (A–Z)
    Next up
    • Verse uses `logic` as the [type
    • For more on query operations, see [Operators
    • Standard Library
    • Persistable Type
    Related topics
    • Verse Glossary Verse Language
    • Verse Language Quick Reference Verse Language
    • Verse Glossary Verse Language
    • Common Types In Verse Verse Language
    • Basics Of Writing Code 2 Basic Programming Concepts In Verse Verse Language

    Related

    Open in graph →

    Linked docs

    • Verse Glossary

    Related topics

    • Verse Glossary
    • Verse Language Quick Reference
    • Verse Glossary
    • Common Types In Verse
    VerseIsland · an archipelago of Verse & UEFN knowledge
    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.