Scripts / Sound script

Author
Message
TattieBoJangle
10
Years of Service
User Offline
Joined: 7th Jan 2014
Location: United Kingdom
Posted: 12th Feb 2014 19:58
Hi guys im looking for a script that adjusts volume of an object in game depending of proximity.



For example i have a speaker and have a looping sound but want the sound to fade or get louder as i walk away or get close to the object is this even possible thanks.

smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 12th Feb 2014 21:30
this is a function in darkbasic pro so i'm sure it'll get added at some point but for now i don't think it's possible (i couldnt find any way to do it at least and i'm not really sure how the sound zones will work but might be worth waiting for them?)

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
tomjscott
User Banned
Posted: 9th May 2014 18:44
I would guess that this sound attenuation will just work properly in future versions without any sort of scripting involved. Audio libraries such as OpenAL and DirectX Audio all support 3D positioning of sound and automatically attenuate according to proximity. So, I can imagine this will be supported in the future.
Scene Commander
Support Manager
16
Years of Service
User Offline
Joined: 3rd May 2008
Location:
Posted: 10th May 2014 09:17
Sneak preview...



SetSoundVolume(volume) - set the volume of the last sound handled 0 to 100



A command hot off the presses so to speak for V1007.



SC

i7-4770s 3.10ghz - Geforce GTX 650ti
Imchasinyou
10
Years of Service
User Offline
Joined: 22nd Mar 2014
Location: OH
Posted: 12th May 2014 03:11
Awesome!

Case: Antec 900, Mobo: Asus Sabertooth 990FX, CPU: AMD T1100 Thuban 6 core @3300 ghz stock settings, COOLER: Thermaltake Frio, MEM: G Skill Ripjaws X series DDR 3 @ 1866 9-10-9-28, HDD: 2 Western Digital caviar Black 750 Gb set in RAID 0, GPU: Saphire HD 6950 flashed with 6970 bios, PSU: Corsair CX750M, MS: Cyborg Rat 7, KB: Logitec G510, OS: Windows 7 home premium 64 bit.
PM

Login to post a reply

Server time is: 2024-12-22 01:41:40
Your offset time is: 2024-12-22 01:41:40