Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __END__
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
- # [XP] DRG - Event Pixel Movement
- # Version: 1.00
- # Author : LiTTleDRAgo
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
- ($imported ||= {})[:drg_ev_pixel_movement] = 1.00
- #==============================================================================
- # THIS SCRIPT IS NO LONGER NEEDED
- #==============================================================================
- #==============================================================================
- #
- # Introduction :
- #
- # This script is an addon for Drago - Pixel Movement.
- #
- #==============================================================================
- pixel = "This script needs Drago Pixel Movement v1.02 or later"
- ($imported[:drg_pixel_movement]||0) >= 1.02 || raise(pixel)
- #==============================================================================
- # ** Game_Event
- #------------------------------------------------------------------------------
- # This class deals with events. It handles functions including event page
- # switching via condition determinants, and running parallel process events.
- # It's used within the Game_Map class.
- #==============================================================================
- class Game_Event
- #--------------------------------------------------------------------------
- # * Constant
- #--------------------------------------------------------------------------
- ALIASING_PIXEL.call(1)
- #--------------------------------------------------------------------------
- # * Alias Method
- #--------------------------------------------------------------------------
- unless method_defined?(:pixel_check_touch)
- alias_method :pixel_initialize, :initialize
- end
- #--------------------------------------------------------------------------
- # * Pixel Movement
- #--------------------------------------------------------------------------
- def initialize(*args)
- pixel_initialize(*args)
- @pixel_movement = true
- end
- end
- #==============================================================================
- # ** Game_Character
- #------------------------------------------------------------------------------
- # This class deals with characters. It's used as a superclass for the
- # Game_Player and Game_Event classes.
- #==============================================================================
- class Game_Character
- #--------------------------------------------------------------------------
- # * Overwriten method: passable?
- #--------------------------------------------------------------------------
- def passable?(x, y, d)
- new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
- new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
- return false unless $game_map.valid?(new_x, new_y)
- return true if @through
- return false unless $game_map.passable?(x, y, d, self)
- return false unless $game_map.passable?(new_x, new_y, 10 - d)
- for event in $game_map.events.values
- #----------------------------------------------------------
- if (event.x - new_x).abs < 1 and (event.y - new_y).abs < 1
- unless event.through || (self == event)
- #----------------------------------------------------------
- return false if self != $game_player
- return false if event.character_name != ""
- end
- end
- end
- #----------------------------------------------------------
- if self != (a = $game_player) && (a.x-new_x).abs < 1 && (a.y-new_y).abs < 1
- #----------------------------------------------------------
- return false if @character_name != "" && !$game_player.through
- end
- return true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement