Verse Library verse

01 Using Instrument Player In Verse

Custom device that automatically disables and re-enables a connected instrument player device after a set delay.

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

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/using-patchwork-instrument-player-devices-in-fortnite-creative
# Local doc:  epic-docs/documentation/en-us/fortnite/using-patchwork-instrument-player-devices-in-fortnite-creative.md
# Section:    Using Instrument Player 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
instrument_player_example := class(creative_device):
@editable
InstrumentPlayer:patchwork_instrument_player_device = patchwork_instrument_player_device{}
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
Sleep(5.0)
InstrumentPlayer.Disable()
Print("Device Disabled")
Sleep(5.0)
InstrumentPlayer.Enable()
Print("Device Enabled")

Comments

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