using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Simulation/Tags }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /UnrealEngine.com/Temporary/Diagnostics }
# Tag-based WORKING-ISLAND loop.
#
# This device finds its collaborators BY TAG at runtime (no @editable wiring,
# no Details-panel binding). A button tagged `working_loop_button_tag` and a
# prop tagged `working_loop_target_tag` are discovered via
# FindCreativeObjectsWithTag. When the button is interacted with, every tagged
# prop spins one third-turn at a time for several hops (the verified
# keyframed-style MoveTo rotation idiom).
# Custom tags. A tag is any class deriving from `tag`. Put the matching tag
# string on the actors in the editor (set_editor_property('tags', [...])) so
# this device discovers them with NO @editable references.
working_loop_button_tag := class(tag) {}
working_loop_target_tag := class(tag) {}
working_loop_device := class(creative_device):
# Number of 120-degree hops per button press (9 = three full turns).
HopCount: int = 9
# Seconds per hop.
SecondsPerHop: float = 0.18
# Total spin time (HopCount * SecondsPerHop) — kept as a float constant so we
# never need an int->float cast.
TotalSpinSeconds: float = 1.62
Verse Library
verse
01 Device
A creative device that uses tags to dynamically discover and rotate props when a specific button is pressed.
verse-library/verse-working-island-tag-loop/01-device.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.