#============================================================================== # ** ExCommand_MessageLock (MACKIE) #------------------------------------------------------------------------------ # This script prevents events (characters) from moving while running # [Show Text]. #============================================================================== # The ID of the switch used as a flag to prevent events from moving. # When set to ON, all moving events on the map will be stopped whenever # [Show Text] is run. # You can turn this feature OFF when a scene is over. EXCMD_MSGLOCK_SID = 24 #------------------------------------------------------------------------------ class Game_Character #-------------------------------------------------------------------------- # * Lock (process secondary to regular event lock) #-------------------------------------------------------------------------- def secondary_lock unless @locked @prelock_direction = @direction @locked = true end end end class Game_Interpreter alias _excmsgl_command_end command_end unless $@ alias _excmsgl_command_101 command_101 unless $@ #-------------------------------------------------------------------------- # * End Event (Definition added) #-------------------------------------------------------------------------- def command_end _excmsgl_command_end unless $BTEST for i in $game_map.events.keys $game_map.events[i].unlock end end end #-------------------------------------------------------------------------- # * Show Text (Definition added) #-------------------------------------------------------------------------- def command_101 unless $BTEST if $game_switches[EXCMD_MSGLOCK_SID] for i in $game_map.events.keys event = $game_map.events[i] event.secondary_lock if @event_id != event.id end end end _excmsgl_command_101 end end