# This script makes sounds play when you hit triggers # First, we define our devices. # A 'Device' is any object in your level. Win_Trigger := struct() { Trigger : Trigger_Device } Win_Sound := struct() { Audio_Player : Audio_Player_Device } # This function runs when the game starts. Main := func() { # We connect the Trigger to the Sound. # When the Trigger is hit, play the Sound. Win_Trigger.Trigger.OnBeginPlay += func() { Win_Sound.Audio_Player.Play() } }