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
317 변수/스위치 다른 이벤트 셀프스위치 조작 - xp, vx 사용가능 3 허걱 2009.07.18 2387
316 다운로드 링크로 가세요.(스크린 샷 올려놨음) 5 Man... 2008.10.27 1618
315 다음 레벨까지의 경험치 강제조정 13 정의로운녀석 2008.07.24 3273
314 이동 및 탈것 달리면 스태미너가 감소하는 스크립트 18 file 카르와푸딩의아틀리에 2009.06.30 2869
313 이동 및 탈것 달릴때 그래픽을 바꿔주는 스크립트 12 file 아방스 2008.01.24 4097
312 키입력 답을 입력하는 텍스트박스 스크립트!! 21 file 좀비사냥꾼 2009.03.29 4206
311 이동 및 탈것 대각선 이동 스크립트 17 아방스 2009.05.02 3677
310 파티 대규모파티 KGC스크립 50 file RPGbooster 2008.10.08 6012
309 전투 대미지 MP전환 스테이트 : 수정 => 마나쉴드 7 Evangelista 2009.08.29 2384
308 전투 대미지%MP흡수 스크립트 4 Evangelista 2009.08.31 2279
307 이동 및 탈것 대쉬금지의 변경 1 rukan 2009.07.02 1449
306 메시지 대화창효과 8 078656577er 2009.10.20 5972
305 기타 던전에 적정 레벨이 어떤건지 스크린에 표시해주는 스크립트! 5 file 루시페르 2009.06.06 2907
304 기타 데이터베이스 자체 제한 해체 스크립트 [Database Limit Breaker] 13 file 할렘 2009.02.07 3562
303 아이템 돈 아이템 장비를저장 11 file RPGbooster 2008.10.11 3452
302 전투 돌아가는 전투 메뉴 시스템 33 아방스 2008.08.29 5083
301 이동 및 탈것 동료가 따라다니게 하는 스크립트 59 file 아방스 2008.01.23 6512
300 액터 동료가 따라다니게 하는 스크립트 (Woratana's Caterpillar System) 5 MinaAubert 2012.09.13 3012
299 영상 동영상 재생 스크립트.-Game_Film II-(테스트) 7 할렘 2009.02.22 3741
298 아이템 드롭 아이템 확장 6 신규회원 2012.02.24 2977
Board Pagination Prev 1 ... 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ... 32 Next
/ 32