I put your code as is in my editor and other things failed, there you have the code you need done well ![]()
Remember to change the name of the main class “PRUEBA” to the one you had! and if not change the name of the verse file to PRUEBA.verse
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Verse.org/Native }
using { /Verse.org/Simulation }
using { /Verse.org/Concurrency }
using { /Verse.org/Random }
using { /Verse.org/Verse }
using { /UnrealEngine.com/Temporary/Diagnostics }
PRUEBA := class(creative_device):
# List of songs (audio devices) to choose from
@editable Song1 : audio_player_device = audio_player_device{}
@editable Song2 : audio_player_device = audio_player_device{}
@editable Song3 : audio_player_device = audio_player_device{}
@editable Song4 : audio_player_device = audio_player_device{}
@editable Song5 : audio_player_device = audio_player_device{}
@editable Timer:timer_device = timer_device{}
RandomInt:int = 0
OnBegin<override>()<suspends>:void =
# Subscribe to the timer's SuccessEvent
Timer.SuccessEvent.Subscribe(PlayRandomSong)
temp:int=GetRandomInt(0,4)
RandomInt + temp
# This function plays a random song from the Songs array
PlayRandomSong(Agent:?agent):void =
if(RandomInt=0):
Song1.Play()