Free Models and Media / [FREE] Sound Zone 3D + Script 3D (reconditioned for GameGuru 027+)

Author
Message
Devcore35
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 5th Aug 2014
Location: Rouen (76) - France
Posted: 23rd Apr 2015 08:44
Hello everyone,

Today I am sharing a 3D script reconditioned plus an expansion area that allows to find and change the center of the area from where the sounds come out at maximum power.

You can find the object attached

INSTALLATION:

1 - Unzip "sound3D.zip"
2 - Copy the folder "sound3D" who it is in the "entitybank" folder in "GameGuru \ Files \ entitybank \"
3 - Copy the "soundbinau.lua" who it is in the "scriptbank" file folder "GameGuru \ Files \ scriptbank \"
4 - In GameGuru place the "sound3D" area on your supposed to be issuing a sound environment (such as a radio or beach). Choose your sound (note: there will be broadcast loop).
5 - Enjoy!

This is only a upgrade of the script with an area to simplify your development.
Thank you for HockedKid for the base of the script.


I hope you simplify his life ^^
Good development at all !

Attachments

Login to view attachments
PM
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 23rd Apr 2015 10:25 Edited at: 23rd Apr 2015 10:47
Excellent stuff guys. Works as advertised straight out of the box.

Kudos to you all.

PS: For those curious, the big advantage, (despite volume x distance scripts being available) is that increasing the detection zone allows larger areas to be encompassed within "hearing range" of the applied sfx/music with an awesome fade off occurring at the edges of the zone.

Just so you know, the timing on this was excellent for me. Spent half a day putting in multiple "volume attentive rocks" to detect a reef break along the entire shore of a beach scene. Sure enough, I got it all working.

I used this plugin and the exact same job was done in about 30 seconds.
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
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 23rd Apr 2015 12:47
Awesome script thank you very much
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 23rd Apr 2015 17:03
anyway to alter this so it uses Sound1 and not sound0 as it fades in and out my music as well..... can we assign sound1 or is this hard coded
Gtox
3D Media Maker
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 23rd Apr 2015 19:15
Much needed, thanks.
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 23rd Apr 2015 21:13 Edited at: 23rd Apr 2015 22:03
Quote: "anyway to alter this so it uses Sound1 and not sound0 as it fades in and out my music as well..... can we assign sound1 or is this hard coded"

The sound played is attached to the zone - which has only one "slot". (see: soundbinau.lua)

Will look at this myself now. Didn't test it with music yesterday.

EDIT
tarkus - tested this with "proper" music and it worked fine. Volume was changing when using musicinzone though.

(Another job for devs? SetVolume needs an "e")
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
PM
Devcore35
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 5th Aug 2014
Location: Rouen (76) - France
Posted: 24th Apr 2015 08:10
Hi,

Unfortunately I do not know enough about the LUA scripts to respond.
By cons I tested the script in greater depth in a huge level and I think it happens a bug. To explain I have a music (loop) atmosphere like "forest." This one that permeates every level with a simple LUA script in "loop". When I now places the 3D sound the distance to the player is no longer taken into account.
I do not know if it is very clear but I think if you put too much music at the same time then GameGuru is no longer able to play them correctly.

I considered that...

Otherwise you can use "soundbinau.lua" on a dynamic object (any) where you specify "always on" in the parameters of the object ; this should solve the problem.
PM
Peri
Game Guru Backer
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location:
Posted: 4th Jun 2015 00:34
Hi guys

every time I use "transportinzone"

so the 3D sound is stop any ideas?
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 26th Jul 2015 09:03
thanks very much for this
Professional Programmer: Languages- SAS, C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro, Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen).
SoUlFaThEr
8
Years of Service
User Offline
Joined: 20th Jul 2015
Location:
Posted: 27th Jul 2015 21:18
Hi and thank you for your work its really cool!
I dont full yunderstand it tho. Was this mean to play over the entire map? I thought it was for a specific area defined by changing the shape of the zone itself.

For me, once placed....it plays my sound very nicely over the entire map basically where ever i go and I am 70% not in the trigger zone of it.

Any help?
The only stupid questions are those that were never asked.
PM
JPH-GAMES
3D Media Maker
9
Years of Service
Recently Online
Joined: 13th Feb 2015
Location: Belgique
Posted: 30th Jul 2015 00:16
big thanks
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 1st Aug 2015 16:53 Edited at: 1st Aug 2015 18:28
This script works really well now, I have my main music as Sound0 and just changed the script to play sound 1, work amazingly well. Great for assigning to dynamic objects.

Here's a tip, not sure if you realise, for sound effects used for ambience, such as humming machines, save your audio file as a MONO WAV.

This will ensure that the sound location will pan around when the player rotates and move around the object.

This only works with MONO WAVS, mono Oggs don't pan they just stay centre of stereo image. Stereo Wavs or Oggs don't pan either.

Great script Devcore.

https://www.dropbox.com/s/zrgugqth077bc7d/soundbinua.lua%20-%20Realism%20Test.avi?dl=0
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
Devcore35
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 5th Aug 2014
Location: Rouen (76) - France
Posted: 1st Aug 2015 22:55
Thank you for information Tarkus1971 in fact it works better with a WAV audio MONO.
However I discovered a strange thing: If a level is too full 3D sound is not working properly (I have designed three months a giant level with over 3000 3D objects when nothing in it). So if the level is too sure to turn "Always Active = Yes" option. By specifying this option on the object where you put "soundbinau.lua" that will solve the problems of 3D sounds.
PM
ShadeHunter
8
Years of Service
User Offline
Joined: 29th Jul 2015
Location: Finland
Posted: 2nd Aug 2015 10:42
Hi Thanks for this Devcore35, I'm sure I'm going to use it

I'm really bad at scripting and all what comes with it, but I can compose music.
SoUlFaThEr
8
Years of Service
User Offline
Joined: 20th Jul 2015
Location:
Posted: 11th Aug 2015 11:45
In a test map I applied this with a 16bit mono sound to a proper zone and made the zone relatively large.
I ran VERY far away.......but the sound never stopped as apparently it issues a stopsound in the script. Albeit the sound was extremely quiet as i had to turn up sound but it actually never stops playing.

anyone else with this?
Does the sound it uses need to be in a specific folder to work properly and actually stop?
The only stupid questions are those that were never asked.
PM
Inertia
8
Years of Service
User Offline
Joined: 12th Jul 2015
Location: SoCal, USA
Posted: 13th Aug 2015 03:14
SoUlFaThEr wrote: "I ran VERY far away.......but the sound never stopped as apparently it issues a stopsound in the script."


I noticed this, too, mate. The reason that StopSound(e,0) never executes is because triggers do not have an "Always Active?" property like entities do (in other words, the script stops processing after you get a certain distance away).

To solve this, I deleted the Sound 3D trigger zone and attached the script to an entity which I set to "Always Active? Yes". You can set "Spawn At Start? No" if you like; the script will still work. Also, remember to add the sound to Sound0 and set "Static Mode? No".
Windows 7 (x64) | i5-2500K @ 3.30 GHz | 4GB RAM | GTX580 1.5 GB
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 25th Aug 2015 23:49 Edited at: 26th Aug 2015 10:44
FOUND ANOTHER BUG...
the script works fine if I use it with the 3d sound zone or if I attach it directly to the entity i want to plays sound..but I have the loop bug as SoulFather explained when I enter in the sound zone with a dynamic entity..

for example I carried a crate on the zone (with the Dvader pickup and carry script) and after that the sound plays in loop and never ends...

Devcore can you test this issue??

is there a way to solve??


edit...

the bug apper even when another dynamic entity make an acton...
since i setted a door on automatic and after I pass trought the dor 8and the door automatically activate ) the sound loops...


tried again..... confirmed
PC Specs:

Q9550@3,8GHZ - 8GB RAM - SVGA R9 280 3GB GDDR5 - HDD WD 1500TB
PM
FabledFoe
8
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 27th Aug 2015 08:58 Edited at: 27th Aug 2015 09:43
I used it, very cool, thank you.

How do I control the volume?

Nevermind, I figured it out. For some reason when I changed the volume and saved it, it wouldn't save and reverted back to the original 100. As long as I went back into the file and looked at the script after I saved it, it would stay at the level I saved it at. Works now.
"Don't give up on your dreams, or your dreams will give up on you."- SS <*})))><
FabledFoe
8
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 27th Aug 2015 09:47
Now, how do I turn it off? I killed the entity it was attached to, but the sound still plays.
"Don't give up on your dreams, or your dreams will give up on you."- SS <*})))><
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 28th Jun 2017 13:31
Thread Unlocked.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Login to post a reply

Server time is: 2024-05-08 20:58:48
Your offset time is: 2024-05-08 20:58:48