VX 스크립트

 

※ 이 스크립트를 사용하기 위해서는 『주석을 활용한 이벤트 커맨드 확장』스크립트가 필요합니다.※

 

필드에서 돌아다니다가 전투에 돌입할 경우

 

필드음악 → 전투음악

 

으로 바뀌는데 이 스크립트를 사용 하면 필드음악 그대로 전투에 돌입 할 수 있습니다.

 

또한 전투 종료시 승리곡도 안나오게 할 수 있습니다. 

 

사용 방법은 자신이  원하는 때에

 

『이벤트 커맨드』 → 흐름제어 부분에서 『주석』선택.

 

배틀신에서 곡 넘기기 ON  ← 이라고 적어주시면 됩니다.

 

전투종료후 승리곡도 넘기고 싶으시다면 뒤에다 + 를 붙여 주시면 됩니다.

 

그리고 원래대로 돌려 놓고 싶으실때에는

 

배틀신에서 곡 넘기기 OFF ←라고 적어주시면 됩니다.

 

출처 : http://mdc-light.jpn.org/TYPE74RX-T/index.html
 

 

아래부터  스크립트

 

#
#    バトルシーンに曲持ち越し(RGSS2)
#  (C)2008 TYPE74RX-T
#

#==============================================================================
# ★ RX_T_rgss2c4
#------------------------------------------------------------------------------
#  Game_Party専用モジュールです。
#==============================================================================

module RX_T_rgss2c4
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super
    # ★ バトルシーンに曲持ち越しフラグ
    @rx_bgm_continue_in_battle = false
    # ★ 勝利曲スルーフラグ
    @rx_victory_bgm_through = false
  end
  #--------------------------------------------------------------------------
  # ★ バトルシーンに曲持ち越しフラグ
  #--------------------------------------------------------------------------
  def rx_bgm_continue_in_battle
    return @rx_bgm_continue_in_battle
  end
  #--------------------------------------------------------------------------
  # ★ バトルシーンに曲持ち越しフラグの設定
  #--------------------------------------------------------------------------
  def rx_bgm_continue_in_battle=(flag)
    @rx_bgm_continue_in_battle = flag
  end
  #--------------------------------------------------------------------------
  # ★ 勝利曲スルーフラグ
  #--------------------------------------------------------------------------
  def rx_victory_bgm_through
    return @rx_victory_bgm_through
  end
  #--------------------------------------------------------------------------
  # ★ 勝利曲スルーフラグの設定
  #--------------------------------------------------------------------------
  def rx_victory_bgm_through=(flag)
    @rx_victory_bgm_through = flag
  end
end

#==============================================================================
# ■ Game_Party
#------------------------------------------------------------------------------
#  パーティを扱うクラスです。ゴールドやアイテムなどの情報が含まれます。このク
# ラスのインスタンスは $game_party で参照されます。
#==============================================================================

class Game_Party < Game_Unit
  include RX_T_rgss2c4
end

#==============================================================================
# ■ Interpreter
#------------------------------------------------------------------------------
#  イベントコマンドを実行するインタプリタです。このクラスは Game_System クラ
# スや Game_Event クラスの内部で使用されます。
#==============================================================================

class Game_Interpreter
  #--------------------------------------------------------------------------
  # ★ 注釈
  #--------------------------------------------------------------------------
  alias rx_rgss2c4_command_108 command_108
  def command_108
    # バトル曲持ち越しON
    if @parameters[0].include?("배틀신에서 곡 넘기기 ON")
      # バトル曲持ち越しフラグON
      $game_party.rx_bgm_continue_in_battle = true
      # 「+」が含まれているか
      if @parameters[0].include?("+")
        # 勝利曲スルー
        $game_party.rx_victory_bgm_through = true
      else
        $game_party.rx_victory_bgm_through = false
      end
      # 継続(競合対策)
      return true
    end
    # バトル曲持ち越しOFF
    if @parameters[0].include?("배틀신에서 곡 넘기기 OFF")
      # バトル曲持ち越しフラグOFF
      $game_party.rx_bgm_continue_in_battle = false
      # 継続(競合対策)
      return true
    end
    # メソッドを呼び戻す
    rx_rgss2c4_command_108
  end
end

#==============================================================================
# ■ Scene_Map
#------------------------------------------------------------------------------
#  マップ画面の処理を行うクラスです。
#==============================================================================

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # ● バトル画面への切り替え
  #--------------------------------------------------------------------------
  alias rgss2c4_call_battle call_battle
  def call_battle
    # ★ バトルシーンに曲持ち越しフラグが立っていれば
    return rx_2c4_call_battle if $game_party.rx_bgm_continue_in_battle
    # メソッドを呼び戻す
    rgss2c4_call_battle
  end
  #--------------------------------------------------------------------------
  # ★ バトル画面への切り替え(マップ画面で鳴っていた曲をバトル画面に持ち越す)
  #--------------------------------------------------------------------------
  def rx_2c4_call_battle
    @spriteset.update
    Graphics.update
    $game_player.make_encounter_count
    $game_player.straighten
    $game_temp.map_bgm = RPG::BGM.last
    $game_temp.map_bgs = RPG::BGS.last
    Sound.play_battle_start
    $game_temp.next_scene = nil
    $scene = Scene_Battle.new
  end
end

#==============================================================================
# ■ Scene_Battle
#------------------------------------------------------------------------------
#  バトル画面の処理を行うクラスです。
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # ● 勝利の処理(マップ画面で鳴っていた曲をバトル画面に持ち越す)
  #--------------------------------------------------------------------------
  alias rgss2c4_process_victory process_victory
  def process_victory
    # ★ バトルシーンに曲持ち越しフラグが立っていれば
    return rx_2c4_process_victory if $game_party.rx_bgm_continue_in_battle
    # メソッドを呼び戻す
    rgss2c4_process_victory
  end
  #--------------------------------------------------------------------------
  # ● 勝利の処理
  #--------------------------------------------------------------------------
  def rx_2c4_process_victory
    @info_viewport.visible = false
    @message_window.visible = true
    # 勝利曲スルーフラグが無ければ勝利曲を流す
    $game_system.battle_end_me.play unless $game_party.rx_victory_bgm_through
    unless $BTEST
      $game_temp.map_bgm.play
      $game_temp.map_bgs.play
    end
    display_exp_and_gold
    display_drop_items
    display_level_up
    battle_end(0)
  end
end

Comment '2'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
130 기타 Gamepad Extender VX 습작 2015.01.02 672
129 기타 VX Weather Script by ccoa 1 Alkaid 2010.09.08 1318
128 기타 reijubv - New Balloon Command (VXA에서도 작동) 1 file 혜인 2013.04.08 1332
127 기타 MSX - XP Characters on VX/VX Ace 2 Alkaid 2013.01.26 1346
126 기타 Resize and Scale by OriginalWij 1 습작 2013.05.13 1349
125 기타 페이드 시간 변경 2 rukan 2009.07.01 1360
124 기타 Drop Options 1.1 by Modern Algebra 4 Alkaid 2010.09.16 1509
123 기타 OriginalWij's Script Compilation 1.2 2 Alkaid 2010.09.20 1583
122 기타 『주석을 활용한 이벤트 커맨드 확장』스크립트 1 rukan 2009.07.02 1600
121 기타 그림자 없애기... 3 비극ㆍ 2010.04.19 1642
120 기타 Etude87_Hangul_utf8_List 습작 2012.06.04 1665
119 기타 ActivateEvents 8 file EuclidE 2010.09.18 1692
118 기타 Wora's Christmas Giftbox 2008 4 file Alkaid 2010.09.18 1747
» 기타 배틀신에서 곡 넘기기 2 rukan 2009.07.02 1757
116 기타 KGC counter 스크립트. 반격기 추가스크립트입니다. 4 우켈킁 2011.03.31 1812
115 기타 장애물을 피하고 다가오게 하는 스크립트 5 file 박력남 2014.02.25 1877
114 기타 Etude87_GAGA_Chat 4 습작 2012.06.14 1916
113 기타 Modified Advanced Weather Script VX 1.1 3 file Alkaid 2010.10.08 1967
112 기타 TagNote v2.0 5 Man... 2008.10.28 1996
111 기타 みんと씨의 RMVX 샘플 프로젝트 1.11 (2009-11-05) 6 Alkaid 2010.09.13 2005
Board Pagination Prev 1 2 3 4 5 6 7 Next
/ 7