Verse Library verse

01 Using Music Manager In Verse

Script that toggles a Patchwork Music Manager device on and off at set intervals.

extracted-snippets/documentation/en-us/fortnite/using-patchwork-music-manager-devices-in-fortnite-creative/01-using-music-manager-in-verse.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/using-patchwork-music-manager-devices-in-fortnite-creative
# Local doc:  epic-docs/documentation/en-us/fortnite/using-patchwork-music-manager-devices-in-fortnite-creative.md
# Section:    Using Music Manager in Verse
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# A Verse-authored creative device that can be placed in a level
music_manager_example := class(creative_device):
@editable
MusicManger:patchwork_music_manager_device = patchwork_music_manager_device{}
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
Sleep(5.0)
MusicManager.Disable()
Print("Device Disabled")
Sleep(5.0)
MusicManager.Enable()
Print("Device Enabled")

Comments

    Sign in to vote, comment, or suggest an edit. Sign in