#============================================================================== # ○コラプスSE個別設定 Ver1.00 # for RGSS2 # 西瓜 / Space not far # http://muspell.raindrop.jp/ # 各エネミー、アクターごとにコラプスSEを個別に設定します。 # 何も設定しない場合はデータベースで設定したSEが再生されます。 #============================================================================== # エネミーのコラプスSEを設定する時は # 各エネミーのメモ欄に <コラプスSE:ファイル名> # もしくは <コラプスSE:ファイル名,音量,ピッチ> # の形式で書き込んでください。 =begin ●設定例 <コラプスSE:Fire1> <コラプスSE:Horse, 100, 100> =end module SNF ACTOR_COLLAPSE = [] # 初期化 # 各アクターのコラプスSEを設定します。 # ACTOR_COLLAPSE[アクターID] = RPG::SE.new("ファイル名", 音量, ピッチ) # 設定例 ACTOR_COLLAPSE[2] = RPG::SE.new("Horse", 100, 100) ENEMY_COLLAPSE = "コラプスSE" end class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # ● コラプスの実行 #-------------------------------------------------------------------------- def perform_collapse collapse_se = enemy.note.scan(/<#{SNF::ENEMY_COLLAPSE}:(\S+),(\d+),(\d+)>/) collapse_se = enemy.note.scan(/<#{SNF::ENEMY_COLLAPSE}:(\S+)>/) if collapse_se == [] if $game_temp.in_battle and dead? @collapse = true if collapse_se == [] Sound.play_enemy_collapse else collapse_se[0][1] = 100 if collapse_se[0][1] == nil collapse_se[0][2] = 100 if collapse_se[0][2] == nil RPG::SE.new(collapse_se[0][0], collapse_se[0][1].to_i, collapse_se[0][2].to_i).play end end end end class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ● コラプスの実行 #-------------------------------------------------------------------------- def perform_collapse if $game_temp.in_battle and dead? @collapse = true if SNF::ACTOR_COLLAPSE[actor.id] == nil Sound.play_actor_collapse else SNF::ACTOR_COLLAPSE[actor.id].play end end end end