In this last step of the Tagged Lights Puzzle tutorial, you'll find the complete script for the puzzle and ideas to further change the example.
Complete Script
The following code is the complete script for a reusable puzzle that requires the player to find the right combination of lights by toggling their state with buttons.
using { /Fortnite.com/Devices }
using { /Verse.org/Native }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Simulation/Tags }
using { /Verse.org/Simulation }
# Derive from the `tag` class in the Verse.org/Simulation/Tags module to create a new Gameplay Tag.
puzzle_light := class(tag){}
log_tagged_lights_puzzle := class(log_channel){}
On Your Own
By completing this tutorial, you’ve learned how to create a reusable puzzle using Verse that requires the player to find the right combination of lights by toggling their state with buttons.
Using what you’ve learned, try the following:
Create more tags and use them to control the lights with a deterministic visual order.
Use different initial conditions and solutions and add more buttons and lights to create more puzzles with the same setup.
Control multiple types of devices with multiple types of user-interactable devices.