So, I have an irregular shaped area that I want to have music in. Ive used a zone to do this since I can shape it but when i set my script to play the sound at entry and stop at exit, it works BUT, here is the kicker, the music is garbled. . . . really badly garbled. It actually sounds more like electrical noise.
Id like to figure out how to have it fade in and out as you enter or leave. This is way over my head but I must say, Im learning little by little.
Here is the script:
-- LUA Script - precede every function and global member with lowercase name of script + '_main'
-- Player hears music with use of trigger zone
--Initial script by: Imchasinyou
--Edited by:
SndPlaying = SndPlaying or {}
function soundmark_init(e)
SndPlaying[e] = false;
end
function soundmark_main(e)
if g_Entity[e]['plrinzone']==1 then
PlaySound(e,0);
end
if g_Entity[e]['plrinzone']==0 then
StopSound(e,0);
SndPlaying[e] = false;
end
end
If you can improve or fix this for me, Please note yourself at the top so i know who helped me.
[img]http://files.enjin.com/191696/UA Members Banners/Imchasinyou.jpg[/img]