using { /Fortnite.com/Devices } using { /Fortnite.com/Devices/Patchwork } using { /Verse.org/Simulation } # This is our main script. # It connects the drum player to the distortion. my_music_maker := class(creative_device): # These are the devices we will use. # Think of them like boxes in your inventory. # note: Assign each device in the UEFN details panel after placing it on the island. @editable drum_player : drum_player_device = drum_player_device{} @editable distortion : distortion_effect_device = distortion_effect_device{} # This function runs when the game starts. OnBegin() : void = # 1. Set the Drive to high. # This makes the sound crunchy! # note: distortion_effect_device exposes Drive and Mix as editable # properties in the details panel; SetDrive/SetMix are not runtime API. # Set Drive to 0.8 and Mix to 1.0 in the UEFN details panel instead, # or use the Patchwork graph to wire devices together visually. distortion.Enable() # 2. Set the Mix to 100%. # This means we hear ONLY the distorted sound. distortion.Enable() # 3. Start the drum player. # The music will start playing now. drum_player.Enable()