Finding Lights At Runtime Using Gameplay Tags
By completing this step in the Tagged Lights Puzzle tutorial, you'll learn how to use Verse Tags to find actors marked with a specific tag while the game is running. Verse Tags let you work with multiple devices without having to set up their references in the editor. This can open up interesting gameplay opportunities where, for example, your code dynamically changes which devices are active as the player progresses through the game.
Follow these steps to create a new Verse Tag and assign it to all the lights in the level for the puzzle:
-
Open Verse Explorer and double-click tagged_lights_puzzle.verse to open the script in Visual Studio Code.
-
At the top of the code file:
-
Add
using { /Verse.org/Simulation/Tags }to reference thetagclass and and use theFindCreativeObjectsWithTag()function. -
Add
using { /Verse.org/Simulation }to be able to make editable properties.| | | | --- | --- | | | using { /Fortnite.com/Devices } | | | using { /Verse.org/Native } | | | using { /UnrealEngine.com/Temporary/Diagnostics } | | | using { /Verse.org/Simulation/Tags } | | | using { /Verse.org/Simulation } | | | | | | log_tagged_lights_puzzle := class(log_channel){} |
-
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 your BrainDead.TV / BrainDeadGuild Discord account for full access.