Project1
标题:
如何用地图音乐当战斗音乐
[打印本页]
作者:
quyangyang
时间:
2022-2-6 18:54
标题:
如何用地图音乐当战斗音乐
就是触发战斗后,地图音乐不停止,继续播放
我试了取消战斗音乐,结果只是没有声音
还找到一个脚本
class Scene_Map < Scene_Base
def call_battle
@spriteset.update
Graphics.update
$game_player.make_encounter_count
$game_player.straighten
Sound.play_battle_start
$game_temp.next_scene = nil
$scene = Scene_Battle.new
end
end
也只是没有声音了,并没有继续播放地图音乐
作者:
alexncf125
时间:
2022-2-6 19:41
本帖最后由 alexncf125 于 2022-2-6 19:44 编辑
忠告: 若看见类似
$scene
= Scene_Battle.new等写著$scene的代码, 那九成不是VA能用的脚本
module BattleManager
class << self
#--------------------------------------------------------------------------
# ● 播放战斗 BGM
#--------------------------------------------------------------------------
alias mapbgm_play_battle_bgm play_battle_bgm unless $@
def play_battle_bgm
return if $game_system.mapbgm == true
mapbgm_play_battle_bgm
end
end
end
class Game_System
#--------------------------------------------------------------------------
# ● 定义实例变量
#--------------------------------------------------------------------------
attr_accessor :mapbgm
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
alias mapbgm_initialize initialize
def initialize
mapbgm_initialize
@mapbgm = true
end
end
class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# ● 切换战斗画面前的処理
#--------------------------------------------------------------------------
alias mapbgm_pre_battle_scene pre_battle_scene
def pre_battle_scene
$game_system.mapbgm = true
mapbgm_pre_battle_scene
$game_system.mapbgm = false
end
end
复制代码
作者:
quyangyang
时间:
2022-2-10 22:14
alexncf125 发表于 2022-2-6 19:41
忠告: 若看见类似$scene = Scene_Battle.new等写著$scene的代码, 那九成不是VA能用的脚本
...
感谢大神,我是小白,我还想知道如何调整字体大小,是需要脚本还是改动一些内容呢?
作者:
BCJT
时间:
2022-2-11 08:59
VA自带这个功能,你把战斗音乐设置成与地图同名同音调即可,只改变音量的话不影响音乐的播放,非常好。
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1