Game Development Community

Triggering audio - help needed

by Jesse P · in General Discussion · 10/19/2007 (10:01 pm) · 1 replies

Ok I've spent most of the evening trying various things I read on the forums with no luck, I need help with audio. Here's what I want to do:

throughout the mission I want to have various locations that the player walks through and then says something to himself, I've recorded several ogg files and need to be able to have very localized triggers. I tried the audio emitter but when he enters it it plays which is good but then when he keeps walking it stops playing as soon as he leaves the emitter's vicinity. What do you guys recommend?

#1
10/23/2007 (11:21 am)
Create a trigger and have the onEnter play the audio file. Might want to store the handle to the audio file so you can stop it to restart the audio file if they reenter it, or store the time it was said using $sim::time so that you can only play it once every so many milliseconds.

Hope this helps.