Teabone
Omega Core has a sound library that allows you to play sounds from a pre-defined list in script.
Here's an example I snipped from my sfx.lua. I pre-define and call my sfx by the index with a stop/start flag. Obviously you can't just plug this in either
-- **********************************************************************
function sfx_Play(sfxnum,playSound)
if sfx_playing[sfxnum] == 0 and playSound == 1 then
ocAULoopSound(sfx[sfxnum])
sfx_playing[sfxnum] = 1
elseif sfx_playing[sfxnum] == 1 and playSound == 0 then
ocAUStopSound(sfx[sfxnum])
sfx_playing[sfxnum] = 0
end
end -- sfx player
-- **********************************************************************
function defn_sfx()
n = 100 -- whispering
sfx[n] = ocAULoadSound("audiobank/stories/bindy/sfx/whisper.wav")
sfx_playing[n] = 0
ocAUSetSoundVolume(sfx[n],100)
n = 101 -- picked up item
sfx[n] = ocAULoadSound("audiobank/stories/bindy/sfx/gotitem.wav")
sfx_playing[n] = 0
ocAUSetSoundVolume(sfx[n],100)
.
.
.
.
etc
end
And yes, something like this
should be standard. Having to tie sound to entities might be OK for most scenarios but if you want it tied to an event... Ugghhhh....
AKA SisterMatic (Steam)
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD