# # 特定のスイッチを押している間のみフラグオン(RGSS2) #  (C)2008 TYPE74RX-T # # ※:カスタマイズポイント…15~16行目 #============================================================================== # ★ RX_T #------------------------------------------------------------------------------ #  設定用 #============================================================================== module RX_T RXSpc_Button = Input::X # ゲームスイッチをONにするのに使うボタンの設定 RXSpc_Switch = 1 # 上記で設定した時にONにするゲームスイッチNo. end #============================================================================== # ■ Game_Player #------------------------------------------------------------------------------ #  プレイヤーを扱うクラスです。イベントの起動判定や、マップのスクロールなどの # 機能を持っています。このクラスのインスタンスは $game_player で参照されます。 #============================================================================== class Game_Player < Game_Character #-------------------------------------------------------------------------- # ● 移動中でない場合の処理 # last_moving : 直前に移動中だったか #-------------------------------------------------------------------------- alias rx_rgss2w1_update_nonmoving update_nonmoving def update_nonmoving(last_moving) # メソッドを呼び戻す rx_rgss2w1_update_nonmoving(last_moving) # ★ X ボタンが押された場合(変更可能。デフォルトはキーボードのA) if Input.press?(RX_T::RXSpc_Button) and not $game_message.visible # 同位置および正面のイベント起動判定(指定のスイッチもONに) $game_switches[RX_T::RXSpc_Switch] = true $game_map.refresh return if get_on_off_vehicle return if check_action_event end end end #============================================================================== # ■ Game_Interpreter #------------------------------------------------------------------------------ #  イベントコマンドを実行するインタプリタです。このクラスは Game_Map クラス、 # Game_Troop クラス、Game_Event クラスの内部で使用されます。 #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # ● 起動中イベントのセットアップ #-------------------------------------------------------------------------- alias rx_rgss2w1_setup_starting_event setup_starting_event def setup_starting_event # メソッドを呼び戻す rx_rgss2w1_setup_starting_event # ★ 指定のスイッチがONで何もセットアップされていなければ if not Input.press?(RX_T::RXSpc_Button) and @list == nil # 指定のスイッチをOFFに $game_switches[RX_T::RXSpc_Switch] = false # 指定のスイッチをOFFにした結果を反映(エラー対策:Scene_Mapに限定) $game_map.refresh if $scene.kind_of?(Scene_Map) end end end