lunariafantasia/Scripts/_.85.rb
2024-01-12 03:12:38 -06:00

28 lines
1.3 KiB
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module FAKEREAL
SELF_MOVABLE = 81 #自律移動の許可スイッチ番号
end
#==============================================================================
# ■ Game_Event
#------------------------------------------------------------------------------
#  イベントを扱うクラスです。条件判定によるイベントページ切り替えや、並列処理
# イベント実行などの機能を持っており、Game_Map クラスの内部で使用されます。
#==============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
# ● 自律移動の更新
#--------------------------------------------------------------------------
alias sms_update_self_movement update_self_movement
def update_self_movement
sms_update_self_movement unless self_movement_stop
end
#--------------------------------------------------------------------------
# 自律移動の停止条件
#--------------------------------------------------------------------------
def self_movement_stop
($game_switches[FAKEREAL::EVENT_RUNNING] || $game_message.busy? || $game_message.visible) &&
!$game_switches[FAKEREAL::SELF_MOVABLE]
end
end