Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,014 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Another Sound Question... #149052
08/19/07 18:06
08/19/07 18:06
Joined: Nov 2006
Posts: 141
South Africa
quasarchangel Offline OP
Member
quasarchangel  Offline OP
Member

Joined: Nov 2006
Posts: 141
South Africa
Why can we not set the sounds to play at a specific volume and a specific distince separately? Everyone knows that gun shots should be heard from quite a distance and so I would like to set them to be heard from quite far. I obviously can do that, but then I can not allow the player to lower the volume of all the sounds in the menu if I wanted to get his attention by playing a gun shot from a distance because he would not hear it if he set the volume to something like 10. Any suggestions to get around this? Or am I missing something?


God DID give us a manual on how to change this world...
Re: Another Sound Question... [Re: quasarchangel] #149053
08/19/07 18:32
08/19/07 18:32
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
The user will set the volume to 100 and set the volume of his speakers to hear normaly if he wants to enjoy the game. If he's playing the game just because he doesnt have anything else to do,you dont need to get his attention with gun shots he doesnt want you to get his attention.
Btw , you can hear the sounds from far by increasing the volume , but it'll be too loud at the bullet possition. It is realistic if you do it that way,but after all this is a game you dont want to scare the player if he is shooting.


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: Another Sound Question... [Re: EpsiloN] #149054
08/19/07 18:50
08/19/07 18:50
Joined: Nov 2006
Posts: 141
South Africa
quasarchangel Offline OP
Member
quasarchangel  Offline OP
Member

Joined: Nov 2006
Posts: 141
South Africa
lol, I meant to have him look in the direction from where the shot came.

Quote:

you dont want to scare the player if he is shooting




Anyway thats the whole point of being able to set a sound at a volume of 50 and then still be able to hear it from far. One can probably work around it but its always nice to have a bit more flexibility and it can't be dificult to change the function to take another parameter.


God DID give us a manual on how to change this world...
Re: Another Sound Question... [Re: EpsiloN] #149055
08/19/07 18:51
08/19/07 18:51
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
convert all sound volumes to a percent based on the player location. I have not tried it in practice, just an idea.

Last edited by Nowherebrain; 08/19/07 18:51.

Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/
Re: Another Sound Question... [Re: Nowherebrain] #149056
08/19/07 19:12
08/19/07 19:12
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
Nowherebrain is right , use something like
snd_vol = ((vec_dist(player.x,sound emitting entity.x) / 20) * -1) + 100;
if snd_vol > 100) { snd_vol = 100; }
if snd_vol < 0) { snd_vol = 0; }

the math...if see(sound emitting entity) is 2000 quants away - snd_vol = 2000 / 20 = 100 * -1 = -100 + 100 = 0.
if see is 1 quant away = 1 / 20 = 0.05 * -1 = -0.05 + 100 = 99.95 (almost max snd vol for example)
Thats in case the sound distance is maximum 2000 quants. Divide by more for higher values. 200 / 2 or 20000 / 200...


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1