#============================================================================== # ** Game_System #------------------------------------------------------------------------------ # This class handles data surrounding the system. # Refer to "$game_system" for the instance of this class. #============================================================================== class Game_System #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- KEY_COMMAND = 'U' attr_accessor :forbid_follow #-------------------------------------------------------------------------- # * Alias Listing #-------------------------------------------------------------------------- alias drg_152_upd update unless method_defined?(:drg_152_upd) #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update trg = BlizzABS::Cache::Keys.find_all{|i|Input.trigger?(Input::Key["#{i}"])} if Input.press?(Input::Key[KEY_COMMAND]) && trg.size > 0 && !$game_party.actors[trg[0]].nil? @forbid_follow = [] if @forbid_follow.nil? if @forbid_follow[trg[0]] @forbid_follow[trg[0]] = false text = 'Follow Me '+ $game_party.actors[trg[0]].name+' !!' $BlizzABS.util.request_damage_sprite($game_player,text) else @forbid_follow[trg[0]] = true text = 'Stay Here '+ $game_party.actors[trg[0]].name+' !!' $BlizzABS.util.request_damage_sprite($game_player,text) end end drg_152_upd end end #============================================================================== # ** Map_Actor #------------------------------------------------------------------------------ # This class serves as character class for any actor on the map. # Controller controls that instance of this class which has the first party # member as battler. #============================================================================== class Map_Actor < Map_Battler #-------------------------------------------------------------------------- # * Alias Listing #-------------------------------------------------------------------------- alias drg_152_updin update_in_caterpillar if !method_defined?(:drg_152_updin) #---------------------------------------------------------------------------- # update_in_caterpillar #---------------------------------------------------------------------------- def update_in_caterpillar() drg_152_updin unless no_follow? end #---------------------------------------------------------------------------- # no_follow? #---------------------------------------------------------------------------- def no_follow? return false if !$scene.is_a?(Scene_Map) return false if $game_system.forbid_follow.nil? || @cindex == nil return true if $game_system.forbid_follow[@cindex] end end