Jump to content


SqueegeeDinoToy

Member Since 08 Apr 2012
Offline Last Active Apr 22 2012 03:15 AM

Posts I've Made

In Topic: Ingame Audio Options

14 April 2012 - 12:01 AM

There is another function, sound_volume(index, value), which only affects one individual sound. You could try that, replacing index with whatever sound you are playing and value with global.volume. But also run the game in Windows and check if the global volume works. If not then these functions don't work in HTML5!


Nope nope and nope. None of that worked so I think I will just take a break and work on some other functions of the game and come back to this. Thanks for the help though too bad it didn't work.

In Topic: Ingame Audio Options

13 April 2012 - 11:53 PM

Do you have two different objects for volume up and down? In that case you would want to make volume a global variable. Just replace all mentions of volume with global.volume.

Also, try changing the amount by which the volume changes when you click from 0.01 to something larger.

If none of that works, it's possible that sound_global_volume() does not work in HTML5.


Yes I have two different objects so I set it to global.volume and then that didn't seem to do anything so i set the 0.01 to 0.5 but still nothin. Are you sure that there isn't any way to be able to change the volume in game?

Actually, the down button now mutes the Sound FX and the up button then proceeds to unmute it. But it won't go higher and the music seems to be unaffected.

In Topic: Ingame Audio Options

13 April 2012 - 11:42 PM

Did you add this code to the create event of "volume_up"?

volume = 0.5; // Set the initial value of volume here


Ah missed that the first time for some reason put it on the wrong object. But now when I click my buttons nothing happens. No errors or anything but the music/FX are not getting louder or quieter.

In Topic: Ingame Audio Options

13 April 2012 - 11:29 PM

sound_global_volume() is a function not a variable. You need to pass a number between 0 and 1 into it, like this:

For volume up:

if (volume < 1) { volume += 0.01; }
sound_global_volume(volume);

For volume down:
if (volume > 0) { volume -= 0.01; }
sound_global_volume(volume);

And in the create event:
volume = 0.5; // Set the initial value of volume here


Ok so I tried your code and I'm getting this error



___________________________________________
ERROR in
action number 1
of Mouse Event for Left Button
for object volume_up:

Error in code at line 1:
   if (volume < 1) { volume += 0.01; }
      ^
at position 5: Unknown variable volume