VerseIsland
FeedLearnLeaderboardGuidesReferenceExploreSearchDocsVerse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Browse UEFN›Materials/VFX·Up to UEFN · Materials/VFX·91 of 108 in Materials/VFX

Detecting When the Puzzle Is Solved

5. 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

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{} |
    
    Copy full snippet
    
  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.

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 Materials/VFX · 91 of 108
Prev
tagged lights 4 toggling lights with buttons in verse
Next
tagged lights 6 final result in verse
Browse all files in this folder (A–Z)

Source

Epic Games documentation

View original

Last updated 2024-12-05T00:00:00+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