How to delay playing a sound...

Tried doing a quick search on this, but I wanted to clarify how to delay playing an audio sound file…

Do I simply use the timer.performWithDelay function?

If someone could post an example using the audio.play command, that would be wonderful

Thank you :slight_smile: [import]uid: 63661 topic_id: 16878 reply_id: 316878[/import]

yes, you simply use timer function [import]uid: 16142 topic_id: 16878 reply_id: 63217[/import]

local function listener (event)
print ( “listener called”)
audio.play(b)
end

timer.performWithDelay (3200, listener)

Thanks, this is how I did it above… I’m sure there is another way, but this seemed to work great… [import]uid: 63661 topic_id: 16878 reply_id: 63228[/import]

Glad you got it sorted - and yes, this is how you’d do it :slight_smile:

(timer.performWithDelay == awesome)

Peach [import]uid: 52491 topic_id: 16878 reply_id: 63744[/import]