Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
sound_vol problems #21208
12/16/03 10:22
12/16/03 10:22
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
i can't get sound_vol to work. first of all, f12 doesn't work. shouldn't it toggle all sound effects on and off?

then if i try to do this:

sound_vol=0;
ent_playloop(my,snd_test,500);
sleep(1);
sound_vol=100;

i can't hear anything? without the sound_vols it works...

...
this doesn't work either:

ent_playloop(my,snd_test,500); // it also doesn't work with ent_playsound
sound_vol=0;

sound_vol seems to get ignored.

...
am i missing something or does anyone have the same problems? isn't sound_vol a way to control the global volume of all wavs currently playing?

Re: sound_vol problems [Re: ventilator] #21209
12/16/03 10:46
12/16/03 10:46
Joined: Jun 2002
Posts: 3,682
Coppell, Texas
Ran Man Offline
Expert
Ran Man  Offline
Expert

Joined: Jun 2002
Posts: 3,682
Coppell, Texas
I use sound_vol like this in a panel
Code:
 hslider 335,274,70,slider_map,0,100,sound_vol; // display the slider 


Anyways, I'm confused... If you set sound_vol to 0, then play ent_playloop like your code shows below, then you should not hear anything, right?

Anyways, I don't use sound_vol anywhere in my game, except for that volume control slider that is on my sound menu.


Cougar Interactive

www.zoorace.com
Re: sound_vol problems [Re: Ran Man] #21210
12/16/03 10:49
12/16/03 10:49
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
Quote:

Anyways, I'm confused... If you set sound_vol to 0, then play ent_playloop like your code shows below, then you should not hear anything, right?


yes, right! but i hear something!

sound_vol doesn't work at all for me!

Re: sound_vol problems [Re: ventilator] #21211
12/16/03 10:59
12/16/03 10:59

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Maybe you can try this: (?)

Code:
sound snd_test = <soundtest.wav>;

function example
{
snd_text = sound_vol=0;
ent_playloop(my,snd_test,500);
sleep(1);
snd_test = sound_vol=100;
}



Re: sound_vol problems #21212
12/16/03 12:15
12/16/03 12:15
Joined: Jun 2002
Posts: 3,682
Coppell, Texas
Ran Man Offline
Expert
Ran Man  Offline
Expert

Joined: Jun 2002
Posts: 3,682
Coppell, Texas
Quote:

sound_vol doesn't work at all for me!



Hmmnn... I don't get it... Well let's get back to basics...

So, here as a quick test I just started a level, then when I walk I can hear the player walking... you know... ta, ta, ta...

Anyways, then I press the tab key, then the debug thing starts up, then I typed in this:

SOUND_VOL=0 <hit return>

Anyways, after I did this, then I could not hear the player walking anymore. Until I typed in the following:
SOUND_VOL=100 <hit return>

Anyways, Are you able to duplicate this???


Cougar Interactive

www.zoorace.com
Re: sound_vol problems [Re: Ran Man] #21213
12/16/03 22:16
12/16/03 22:16
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
ok, i tried that!

what happens is this:

setting sound_vol doesn't affect sounds or loops which are already started but only sounds i start after setting sound_vol. i don't think this is normal behavior?

Re: sound_vol problems [Re: ventilator] #21214
12/17/03 01:25
12/17/03 01:25
Joined: Jun 2002
Posts: 3,682
Coppell, Texas
Ran Man Offline
Expert
Ran Man  Offline
Expert

Joined: Jun 2002
Posts: 3,682
Coppell, Texas
I'll have to try this tonight when I get home.
Right now I'm at work, and game development is not allowed here... LOL


Cougar Interactive

www.zoorace.com
Re: sound_vol problems [Re: Ran Man] #21215
12/17/03 12:57
12/17/03 12:57
Joined: Jun 2002
Posts: 3,682
Coppell, Texas
Ran Man Offline
Expert
Ran Man  Offline
Expert

Joined: Jun 2002
Posts: 3,682
Coppell, Texas
Okay, so I can duplicate what you experience here.

So it seems that we should never set the sound_vol engine variable to zero, before a sound command, because nothing will be heard...

sound_vol=0; // DON'T DO THIS!!!
ent_playloop(my,snd_test,500);


Why do that anyways? snd_loop and ent_playsound all have their own independant volume variables.

snd_loop (sound, var volume , var balance);


I only use sound_vol on my sound menu, so that the player can control the sound volumes in the game. After that, I never use it again, because there is no need for it.


Last edited by Ran Man; 12/17/03 12:58.

Cougar Interactive

www.zoorace.com
Re: sound_vol problems [Re: Ran Man] #21216
12/18/03 00:30
12/18/03 00:30
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
my question is why this doesn't work:

sound_vol=0;
...
ent_playloop(my,snd_test,500);
...
sound_vol=100;

i can't hear anything after setting the volume to 100 again!

if the loop is already started it looks like i can't alter the volume with sound_vol afterwards! is it meant to be that way?

i would like to use sound_vol to fade in/out the volume of all currently playing loops of my game. how would i do this? setting all volumes individually would be very cumbersome!

Re: sound_vol problems [Re: ventilator] #21217
12/18/03 00:40
12/18/03 00:40
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
will it work if you set the sound_vol = 1; then back up?

wondering if setting it to 0 like that isn't just flagging the engine to shut down sound and it doesn't flag the engine sound back on when setting vol up again.

but i havn't ran into this yet myself and i have played .wav and .mid files in levels, turning sound off and back on and works so far.



Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

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