改了一下Scene_Title脚本的195行:“$data_system.title_bgm.play”这里
然后改成
@rand_music = rand(3) + 1
case @rand_music
when 1
Audio.bgm_play("Audio/BGM/1.mp3")
when 2
Audio.bgm_play("Audio/BGM/2.mp3")
when 3
Audio.bgm_play("Audio/BGM/3.mp3")
end
@rand_music = rand(3) + 1
case @rand_music
when 1
Audio.bgm_play("Audio/BGM/1.mp3")
when 2
Audio.bgm_play("Audio/BGM/2.mp3")
when 3
Audio.bgm_play("Audio/BGM/3.mp3")
end
这段这么用
@rand_music = rand(3) + 1 改为 $rand_music = rand(3) + 1并插入到main脚本页的里面的第一行
然后原位置的
case @rand_music
when 1
Audio.bgm_play("Audio/BGM/1.mp3")
when 2
Audio.bgm_play("Audio/BGM/2.mp3")
when 3
Audio.bgm_play("Audio/BGM/3.mp3")
end
改成
case $rand_music
when 1
Audio.bgm_play("Audio/BGM/1.mp3")
when 2
Audio.bgm_play("Audio/BGM/2.mp3")
when 3
Audio.bgm_play("Audio/BGM/3.mp3")
end