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 › Materials/VFX · Up to Fortnite · Materials/VFX · 57 of 211 in Materials/VFX
Browse Fortnite

Detecting When The Puzzle Is Solved

By completing this step in the Tagged Lights Puzzle tutorial, you'll learn how to detect when the player solves the puzzle so you can spawn an item and prevent further interaction with the puzzle

Detecting a Solved Puzzle

This section shows how to detect when the player solves the puzzle by finding the right combination of lights. When the puzzle is solved, the Item Spawner device should be enabled so that it can spawn its item.

Follow these steps to detect when the player solves the puzzle:

  1. Add an editable item_spawner_device field named ItemSpawner to the tagged_lights_puzzle class, to represent the Item Spawner device. @editable ItemSpawner : item_spawner_device = item_spawner_device{}
  2. Next, define what state the lights should be in to solve the puzzle. Since the representation of the lights’ state is a logic array, the solved state of the lights should also be a logic array to easily compare the two. Create an editable logic array field named SolvedLightsState to the tagged_lights_puzzle class. In this example, the player must turn on all the lights to solve the puzzle, so initialize each element with the value true to represent the light being on. @editable SolvedLightsState : []logic = array{true, true, true, true}
  3. Save the file in Visual Studio Code.
  4. In the UEFN toolbar, click Build Verse Scripts to update your Verse device in the level.
  5. In the Outliner, select the tagged_lights_puzzle to open its Details panel.
  6. In the Details panel, set the Item Spawner property to the Item Spawner device that’s in the level.
  7. Next, develop the code that checks if the current LightsState matches the SolvedLightsState. Add a new method named IsPuzzleSolved() to the tagged_lights_puzzle class. This method should succeed if the puzzle is solved and fail if it’s not, to let its caller know the result of the check. This means the method should be marked as failable with the decides specifier. Since the method has the decides specifier, it must also have the transacts specifier, which means the actions performed by this method can be rolled back (as if the actions were never performed), if there’s a failure anywhere in the method.

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 May 12, 2026
    Keep exploring
    More in Materials/VFX · 57 of 211
    Prev
    tagged lights 4 toggling lights with buttons in verse
    Next
    tagged lights 6 final result for tagged lights puzzle in verse
    Browse all files in this folder (A–Z)
    Next up
    • By completing this step in the [Tagged Lights Puzzle
    • In the [last step
    Related topics
    • Tagged Lights 5 Detecting When The Puzzle Is Solved In Verse Materials/Vfx
    • Tagged Lights Puzzle In Verse Materials/Vfx
    • Gameplay Tags In Verse Verse Language
    • Gameplay Tags In Verse Verse Language
    • Verse Tags In Verse Verse Language

    Related

    Open in graph →

    Linked docs

    • Tagged Lights Puzzle In Verse

    Related topics

    • Tagged Lights 5 Detecting When The Puzzle Is Solved In Verse
    • Tagged Lights Puzzle In Verse
    • Gameplay Tags In Verse
    • Gameplay Tags 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