# This is a simplified representation of how the binding works internally. # You don't need to write this for simple devices, but it helps to understand the flow. using { /Fortnite.com/Devices } using { /Verse.org/Simulation } # We define a device that listens for a button press ButtonListener := class(creative_device): # This is the Event we are listening for OnButtonPressed: event(player) = event(player){} # This is the Function we want to call when the event happens OnBegin():void= # We bind our event to a function on another device # In the editor, you do this by dragging and dropping in the Customize panel. # In Verse, you might do: # damage_zone_device.Activate.Bind(Self.OnButtonPressed) OnButtonPressed.Await()