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 · 56 of 211 in Materials/VFX
Browse Fortnite

Toggling Lights With Interactive Buttons

By completing this step in the Tagged Lights Puzzle tutorial, you'll learn how to toggle a group of lights based on which button the player interacts with.

Toggling Lights

You’ll need to create a mapping between a button and the group of lights it should toggle when the player interacts with the button. To do this, you can map each button to the indices of the lights in the Lights array.

This example using the following mapping between buttons and lights:

  • Button 1 maps to the light at index 0 and the light at index 3
  • Button 2 maps to the light at index 0, the light at index 1, and the light at index 2
  • Button 3 maps to the light at index 0, and the light at index 1
  • Button 4 maps to the light at index 1

You can represent this mapping with an array named ButtonsToLights, where each element of ButtonsToLights is another array that holds the indices of the lights. The type of ButtonsToLights is then [][]int, to specify that ButtonsToLights is an array of integer arrays.

Index 0 1 2 3
Element array{0, 3} array{0, 1, 2} array{0, 1} array{1}

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 · 56 of 211
    Prev
    tagged lights 3 finding the lights at runtime with gameplay tags in verse
    Next
    tagged lights 5 detecting when the puzzle is solved in verse
    Browse all files in this folder (A–Z)
    Next up
    • By completing this step in the [Tagged Lights Puzzle
    • 2. Add a new [method
    • You can do this by subscribing to the Button’s `InteractedWithEvent`. See [Coding Device Interactions
    • Player pressing buttons and each button toggles a different set of lights
    Related topics
    • Tagged Lights 4 Toggling Lights With Buttons In Verse Materials/Vfx
    • Tagged Lights 3 Finding The Lights At Runtime With Gameplay Tags In Verse Materials/Vfx
    • Tagged Lights Puzzle Materials/Vfx
    • Tagged Lights 6 Final Result For Tagged Lights Puzzle In Verse Materials/Vfx
    • Gameplay Tags In Verse Verse Language

    Related

    Open in graph →

    Related topics

    • Tagged Lights 4 Toggling Lights With Buttons In Verse
    • Tagged Lights 3 Finding The Lights At Runtime With Gameplay Tags In Verse
    • Tagged Lights Puzzle
    • Tagged Lights Puzzle In Verse
    • Tagged Lights 6 Final Result For Tagged Lights Puzzle 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