New account registration is temporarily disabled.

[RMXP] DRAGO SMOOTH SCROLLER CONFLICT

Posts

Pages: 1
Hi all.

Been using Drago Smooth Scroller script, and it's wonderful.


#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
# Drago Smooth Scroller
# Version: 2.00
# Author : LiTTleDRAgo
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
($imported ||= {}) = 2.00
#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
# This class handles the player. Its functions include event starting
# determinants and map scrolling. Refer to "$game_player" for the one
# instance of this class.
#==============================================================================
ModPlayer = $BlizzABS ? BlizzABS::Controller : Game_Player
class ModPlayer
#--------------------------------------------------------------------------
# * Alias Listing
#--------------------------------------------------------------------------
@@smooth_scroller_update = $BlizzABS ? :update_moving : :update
$@ || alias_method(:smooth_scroller_update, @@smooth_scroller_update)
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
define_method(:"#{@@smooth_scroller_update}") do |*args|
$game_temp.instance_variable_set(:@prevent_map_scroll,true)
smooth_scroller_update(*args)
$game_temp.instance_variable_set(:@prevent_map_scroll,false)
if $BlizzABS
scroll_map_update(player.real_x,player.real_y) if args.at(0) != nil
else
scroll_map_update(@real_x, @real_y)
end
end unless $xrxs_xas
#--------------------------------------------------------------------------
# * Scroll Map Update
#--------------------------------------------------------------------------
def scroll_map_update(real_x,real_y)
real_x, real_y = @real_x, @real_y if $xrxs_xas
if real_y - $game_map.display_y > (tile_y = ($BlizzABS ? CY : CENTER_Y)+ 64)
$game_map.scroll_down(real_y > $game_map.height*128 - tile_y ?
(($game_map.height - (tile_y/64))*128 - $game_map.display_y) / 16.0 :
((real_y - $game_map.display_y - tile_y) / 16.0))
end
if real_x - $game_map.display_x < (tile_x = ($BlizzABS ? CX : CENTER_X)+ 64)
$game_map.scroll_left(real_x < tile_x ? $game_map.display_x / 16.0 :
(($game_map.display_x + tile_x - real_x)/16.0))
end
if real_x - $game_map.display_x > tile_x
$game_map.scroll_right(real_x > $game_map.width*128 - tile_x ?
(($game_map.width - (tile_x/64))*128 - $game_map.display_x)/16.0 :
(real_x - $game_map.display_x - tile_x )/16.0)
end
if real_y - $game_map.display_y < tile_y
$game_map.scroll_up(real_y < tile_y ? $game_map.display_y / 16.0 :
(($game_map.display_y + tile_y - real_y)/16.0))
end
end
end

#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
# This class handles the map. It includes scrolling and passable determining
# functions. Refer to "$game_map" for the instance of this class.
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :prevent_map_scroll
#--------------------------------------------------------------------------
# * Display X, Display Y (rounded value)
#--------------------------------------------------------------------------
.each do |m|
$@ || alias_method(:"ss_display_#{m}",:"display_#{m}")
define_method(:"display_#{m}") { send(:"ss_display_#{m}").round }
end
#--------------------------------------------------------------------------
# * Scroll Down, Scroll Up, Scroll Left, Scroll Right
#--------------------------------------------------------------------------
.each do |m|
$@ || alias_method(:"ss_scroll_#{m}", :"scroll_#{m}")
define_method(:"scroll_#{m}") do |*args|
return if $game_temp.instance_variable_get(:@prevent_map_scroll)
send(:"ss_scroll_#{m}",*args)
end
end unless $xrxs_xas
end


Problem is, it conflicts with RMXP's native scroll map function. It doesn't allow the map to scroll at all, unfortunately.

Map scrolling is essential to some of my events, so I'm wondering if there's a way to turn the script on and off via events.

Or perhaps there's a more functional script for RMXP similar to this one...
Hello MelinHead:

I just come across an updated version (2.02) of the script, which lets you assign a switch to turn off the script in the module.

here's the link it says 2.0 on the forum but once you follow the link it leads you to 2.02.

Though personally I think it kinda slowed down the default scrolling.
Hope it helps.
Pages: 1