Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
GML Script. By using this after our setup_listeners(); gist, you can play audio on any listener, fade over time, and loop.
///audio_play(listener,snd_filename,fade in time[ms],loop?)
var listener = argument0;
var sfx = argument1;
var time = argument2;
var loop = argument3;
if gamepad_is_connected(listener)
sfx = audio_play_sound_on(listener, sfx, loop, 0);
else if listener == noone || listener == -1
sfx = audio_play_sound(sfx,0,loop);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment