How would I have the title screen play a different audio BGM if a save file is present and it has a continue option available?
Continue Music?
RGSSx Script Support def play_title_music
if DataManager.save_file_exists?
Audio.bgm_play("Audio/BGM/" + " BLAH BLAH", 100, 100)
else
$data_system.title_bgm.play
RPG::BGS.stop
RPG::ME.stop
end
end
Replace the scene title def on line 132 with that ^^
if DataManager.save_file_exists?
Audio.bgm_play("Audio/BGM/" + " BLAH BLAH", 100, 100)
else
$data_system.title_bgm.play
RPG::BGS.stop
RPG::ME.stop
end
end
Replace the scene title def on line 132 with that ^^
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
::Josh:: close, but not quite. You're saying to ONLY stop the BGS and ME if there's no save file. But if a save file exists, any BGS and ME playing will continue to play. You just need to move that end up a couple of lines:
::Josh:: close, but not quite. You're saying to ONLY stop the BGS and ME if there's no save file. But if a save file exists, any BGS and ME playing will continue to play. You just need to move that end up a couple of lines:
Code:
def play_title_music if DataManager.save_file_exists? Audio.bgm_play("Audio/BGM/save_file_title_music", 100, 100) else $data_system.title_bgm.play end RPG::BGS.stop RPG::ME.stop end
@Shaz Yeah I was going to edit that real quick haha but my internet took so long to load and when I tried saving it, I failed to save haha
Would it be easy to randomly choose a battle transition for battlestarts?
What about a map notetag? Guess I would need to do a script request for that wouldn't i?
What about a map notetag? Guess I would need to do a script request for that wouldn't i?
Here you go ... this will let you set a battle start SE on the map. If you have several and you want to choose between them randomly, just add several notes in the same format. Put it into its own script slot below Materials. It overwrites these two methods, rather than aliasing them. If you have other scripts that alias them, this script should go above those.
module Sound def self.play_battle_start intro = $game_map.get_battle_intro if intro intro.play else play_system_sound(7) end endendclass Game_Map def get_battle_intro intros = [] @map.note.split(/[\r\n]/).select{|note| note =~ /<battle\s*start/i}.each { |note| note.gsub(/<battle\s*start\s*(\w+)\s*(\d+)?\s*(\d+)?>/i) do intros.push(RPG::SE.new($1, ($2.nil? ? 100 : $2.to_i), ($3.nil? ? 100 : $3.to_i))) end } return intros.size > 0 ? intros[rand(intros.size)] : nil endendIn the map notes, enter one of the following:
battle start can be one or two wordsSE name is mandatory, and MUST be only one word - no spaces
Volume and Pitch are optional - if not entered, they default to 100
Let the command wrap to the next line - do not add manual line breaks.
So the above would randomly choose between Battle1, Battle2 and Battle3 each time a battle begins on that map.
module Sound def self.play_battle_start intro = $game_map.get_battle_intro if intro intro.play else play_system_sound(7) end endendclass Game_Map def get_battle_intro intros = [] @map.note.split(/[\r\n]/).select{|note| note =~ /<battle\s*start/i}.each { |note| note.gsub(/<battle\s*start\s*(\w+)\s*(\d+)?\s*(\d+)?>/i) do intros.push(RPG::SE.new($1, ($2.nil? ? 100 : $2.to_i), ($3.nil? ? 100 : $3.to_i))) end } return intros.size > 0 ? intros[rand(intros.size)] : nil endendIn the map notes, enter one of the following:
Code:
<battle start Battle1 100 100><battlestart Battle2 100><battle start Battle3>
Volume and Pitch are optional - if not entered, they default to 100
Let the command wrap to the next line - do not add manual line breaks.
So the above would randomly choose between Battle1, Battle2 and Battle3 each time a battle begins on that map.
Original thread: https://forums.rpgmakerweb.com/threads/continue-music.20737/