Scripts / need help with soundareazone.lua

Author
Message
nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 21st Nov 2016 21:08
hi there. i have a problem. something is wrong or i make a mistake, i don't know.
i have a campfire on my map and i have the sound of a fire. i want to hear the sound of fire everytime the player comes close to the fire decal.

this is what i did:
i choose "sound zone" from the "markers" menu and in "properties" i attach the file "soundareazone.lua" and the audiofile. i made a small area and it worked in testgame. i made three areas and it also worked. it seems like the sound comes much later than expected but okay.

i made another map with a few more of these fire zones and now my problem is that some of the sound triggers do not work at all and at least one of them makes GG play the fire sound infinite. i want the sound to STOP when the player leaves the zone but one of the zones makes the sound play forever and i checked all of the triggers several times, they all have the same script. so i made just one big sound zone that covers a big part of the playable area but i still have the problem that the sound doesn't stop when i leave the area.

is this even the right script for my idea?
why does this happen?
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti
Freakon
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location: UK
Posted: 26th Nov 2016 01:03 Edited at: 26th Nov 2016 01:44
Hi Nuncio,

The below thread appears to be the most relevant for your question, although I am in work and not able to test the Code in the thread (also its from 02 years ago!!!!)

There may well be an updated version somewhere but I cannot check until I'm home.

https://forum.game-guru.com/thread/209015

Also check out the Broadcast on Sound, If I remember correctly Lee does cover something about distance and volume which I guess is most practical for what you need

https://www.youtube.com/watch?v=xP0sL4GTxZ0

Good Luck! Let me know if this helps, or if it doesn't and I can try to help if I can.
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 26th Nov 2016 16:06 Edited at: 26th Nov 2016 16:08
Try this
https://forum.game-guru.com/attachment/11384
Windows 7 Professional 64-bit
Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz (4 CPUs), ~2.7GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11

Login to post a reply

Server time is: 2024-05-22 02:22:34
Your offset time is: 2024-05-22 02:22:34