anyone know how to do this?
i have a selection in my options menu i made, and you can set the sound ON/OFF, and i was wondering what do i have to put to mute the sound?
I haven't tried it, but looking at Ryex's Collapsing CMS and it's Options menu, the codes for changing music and sound volume is
$game_system.bgm_volume = VALUE IN PERCENT
$game_system.sfx_volume = VALUE IN PERCENT
it says it cant be coerced into fixum
whatever that means...
$game_system.bgm_volume = 0
$game_system.sfx_volume = 0
No %s
just to clarify don't add the percent sign
What I meant with "in percent" was that the lowest value is 0 and the highest is 100.
No offense to anybody, but I simply have to post this:
LOL!
A levelup for everybody here, you just made my day.
it doesnt work for me :/
this comes up AND YES, i did try it in a new game to see if there would be any script collisions
(http://img830.imageshack.us/img830/1224/24994660.png)
you have to make the instance variables public first
wut? i am a n00b scripter... i dont understand what you mean
Add this below all attr_accessors in Game_System.
attr_accessor :bgm_volume
attr_accessor :sfx_volume
no wounder id doesn't work decided to look at Game_System add this script above main
class Game_System
def bgm_volume(vol)
bgm = @playing_bgm
Audio.bgm_play("Audio/BGM/" + bgm.name, vol, bgm.pitch)
Graphics.frame_reset
end
def bgs_volume(vol)
bgm = @playing_bgm
Audio.bgs_play("Audio/BGM/" + bgs.name, vol, bgs.pitch)
Graphics.frame_reset
end
def me_volume(vol)
bgm = @playing_bgm
Audio.bgm_play("Audio/BGM/" + me.name, vol, me.pitch)
Graphics.frame_reset
end
end
to use put this to change the bgm volume
$game_system.bgm_volume(vol)
this to change the bgs volume
$game_system.bgs_volume(vol)
and this to change the me volume
$game_system.me_volume(vol)
vol is the volume you want
I always just use the Mute button on my computer, but hey, that's me.
freakin awesome man thanks :D
oh and @ForeverZer0,
my games in fullscreen and i want the person to be able to mute the music if he or she wishes without having to go the extra mile and push the power on their speakers