using { /Fortnite.com/Devices } using { /Verse.org/Simulation } # This Verse device holds references to the Patchwork devices # placed in the UEFN editor and wired together there. patchwork_controller := class(creative_device): # This is the sound device. It makes the noise. # Drag your Patchwork Speaker into this slot in the editor. @editable Speaker : patchwork_speaker_device = patchwork_speaker_device{} # This is the magic knob. It changes values. # Drag your Patchwork LFO Modulator into this slot in the editor. @editable LFO : patchwork_lfo_device = patchwork_lfo_device{} OnBegin() : void = # Connect the LFO to the Speaker's volume. # Now the volume will change on its own! # note: Patchwork signal routing is primarily done in the # UEFN editor's Patchwork panel by drawing cables between # the LFO output port and the Speaker volume input port. # The code below sets properties on each device to configure # the swell behaviour after the editor cable is in place. # Set the LFO speed. # Low speed = slow swell. High speed = fast wobble. # Rate of 0.5 means one cycle every two seconds. LFO.SetRate(0.5) # Start the speaker so it plays continuously. Speaker.Play()