Soooo many times when I debug I notice that I forgot to fadeout the BGS in some map. 99.999% of the time I need to stop the BGS when I leave the map. Is there an option for it by default to do this automatically?
I have the same problem with rain FX (ME I believe).
And is there a way to stop the BGS instantly? I can only chose to fade-out over 1 second, not 0 seconds. A bit weird that when you turn the TV off that the sound fades out.
BGS, stop instantly & automatically?
● ARCHIVED · READ-ONLY
-
-
Yes, there is a way to stop it instantly.
In every map not using the BGS, make sure the "BGS" selection is checked, but leave it blank. This will turn off any existing BGS as soon as the player enters the map. -
Unless he's using events to control the BGM's and BGS's rather than checking/unchecking them on the map. In that case, he'd need to create an event to stop it or change it, even if he switches to a new map.
ME's are a one-time deal when played each time it's played; outside of a script, I don't know if there is a way to stop an ME from playing after a certain point. -
Look at the "RPG::BGM", "RPG::BGS", and "Audio" pages in the help file for some cool methods that can be used to manipulate audio files, including the methods for immediately stopping the BGM or BGS.
-
I thought that it was some build-in database-option or event perhaps. But seems not.
But ugh I'm so dumb sometimes. It has a .stop() call. Not through an event but with a script call you can still do it. And if I just alias the map setup or such then I can automatically stop or fade it there. Thanks.
Solved:
And yes ME's can also be stopped it seems (only by script calls)Spoiler#sb:auto_silence_bgs [dev]=beginAuto Silence BGSVersion: 1.00Author: NapoleonAbout:- Automatically fades and/or stops Backgrounds sounds (BGS) when transferring between maps.- Supports map notetags.Instructions:- Place below "▼ Materials" but above "▼ Main Process".- Example map-notetags (notetags are optional):<auto_bgs: stop><auto_bgs: fade><auto_bgs: ignore>Requires:- RPG Maker VX AceTerms of Use:- Attribution 3.0 Unported (CC BY 3.0) http://creativecommons.org/licenses/by/3.0/Version History:1.00 (19 August 2014) - First Release=end#===============================================================================# Settings#===============================================================================module Nap; module Auto_Silence_FX # Fade-time in millliseconds FADE_TIME = 1000 # Default behavior for when no map notetag is present. # Possible values: :fade, :stop, :ignore DEFAULT_BEHAVIOR = :fade # Regex (only for advanced users!) BGS_NOTE_REGEX = /<auto_bgs:(fade|stop|ignore)>/ # No spaces in regex!end; end # module Nap; module Auto_Silence_FX#===============================================================================$imported ||= {}$imported[:auto_silence_fx] = 1.00#===============================================================================# Game Map#===============================================================================class Game_Map attr_accessor :auto_bgs_type #----------------------------------------------------------------------------- # Setup [ALIAS] #----------------------------------------------------------------------------- alias nap_auto_silence_fx_setup setup def setup(map_id) nap_auto_silence_fx_setup(map_id) result = (@map.note.downcase.delete(' ') =~ Nap::Auto_Silence_FX::BGS_NOTE_REGEX) result ? @auto_bgs_type = $1.to_sym : @auto_bgs_type = Nap::Auto_Silence_FX::DEFAULT_BEHAVIOR endend#===============================================================================# Scene Map#===============================================================================class Scene_Map < Scene_Base #----------------------------------------------------------------------------- # Pre Transfer [ALIAS] #----------------------------------------------------------------------------- alias nap_auto_silence_fx_pre_transfer pre_transfer def pre_transfer nap_auto_silence_fx_pre_transfer case $game_map.auto_bgs_type when :stop; RPG::BGS.stop when :fade; RPG::BGS.fade(Nap::Auto_Silence_FX::FADE_TIME) when :ignore # do nothing else; raise "nap_auto_silence_fx_pre_transfer: Unknown auto_bgs_type: #{$game_map.auto_bgs_type}!" end endend#===============================================================================
Code:RPG::ME.stopRPG::ME.fade(time) # in ms