using { /Fortnite.com/Devices } using { /Verse.org/Simulation } using { /UnrealEngine.com/Temporary/Diagnostics } # Canyon echo coordinator — wires up devices that are # already placed in the UEFN level via their @editable bindings. # Patchwork audio routing is configured in the editor; # this script handles the gameplay trigger that starts playback. canyon_echo_manager := class(creative_device): # Drag the placed Audio Player device here in the Details panel. @editable MusicSource : audio_player_device = audio_player_device{} # Drag the placed Trigger Volume device here in the Details panel. # The Echo Effect and Output devices are wired to MusicSource # inside Patchwork — no Verse API is needed for that routing. @editable EntranceTrigger : trigger_device = trigger_device{} OnBegin() : void = # Subscribe to the trigger so playback starts when a # player walks into the Canyon Chamber. EntranceTrigger.TriggeredEvent.Subscribe(OnPlayerEntered) # Called automatically each time the trigger fires. # 'Agent' is the player who stepped inside. OnPlayerEntered(Agent : ?agent) : void = # Start the music source. # The Patchwork chain (MusicSource → Echo Effect → Output) # is already configured in the editor, so the echo plays # automatically once the source begins. MusicSource.Play() # note: Echo Effect Delay (0.3 s), Feedback (0.7), and # Mix (0.5) are set on the Echo Effect device in the # UEFN Details panel — there is no runtime Verse API # for adjusting Patchwork parameters at play-time.