I'm assuming I need to modify this, but I am not very Lua fluent. Can anyone help with how to get it to reset with each life (like if my player dies and respawns at the start marker)? I want the sound loop I am using to play just like the first life.
Thanks in advance for any help you can give me!
Jeff
g_ambienceinzone_soundlooping = 0
function ambienceinzone_init(e)
end
function ambienceinzone_main(e)
if g_Entity[e]['plrinzone']==1 then
if g_ambienceinzone_soundlooping ~= e then
StopSound(g_ambienceinzone_soundlooping,0)
LoopNon3DSound(e,0)
ActivateIfUsed(e)
g_ambienceinzone_soundlooping = e
end
end
end
Acer Nitro 5
2.4 GHz Core i5
GeForce GTX1050
32Mb SDRAM
The author of this post has marked a post as an answer.
Go to answer