You need some scripts to do that... Events and Common Events can't handle this efficiently.
Are you planning to scroll it like an Aero Fighter game (from south to north) or more like Gradius (from left to right)?
For a Gradius-like effect, you could try this one...
CODE
#===============================================================================
# ** Jens of Zanicuud horizontal scroll engine v 0.8
# - free use, just credit
# - free customization, just PM me the modified version
# - you can find me at www.rpgrevolution.com
#===============================================================================
# This script will confine the player between the screen's limits by setting
# a certain switch to ON (see next lines for a more precise description).
# This script could have some compatibility problem, since when the switch
# is active, it overruns the update method of the Game_Player class.
# Use it carefully and ask for troubleshooting anytime!
# NOTE: for now, it works ONLY with horizontal scrolling from LEFT to RIGHT!
#===============================================================================
#--------------------------------------------------------------------------
# ** Game_Player
#--------------------------------------------------------------------------
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Constants
#--------------------------------------------------------------------------
#id of the switch which triggers the scroll game (e.g. 1 means you have to
#set the Switch[0001] to ON.
Scroll_game_switch = 1
#--------------------------------------------------------------------------
# * Aliases
#--------------------------------------------------------------------------
alias scroll_system_center center
alias scroll_update update
alias scroll_moving moving?
#--------------------------------------------------------------------------
# * Center camera on the player
#--------------------------------------------------------------------------
def center(x, y)
if !$game_switches[Scroll_game_switch]
scroll_system_center(x,y)
end
end
#--------------------------------------------------------------------------
# * Scroll_Moving?
#--------------------------------------------------------------------------
def scroll_moving?
if @real_x <= $game_map.display_x
if @real_y != @y * 128
return true
else
return false
end
elsif @real_x >= $game_map.display_x + 640*4 - 128
if @real_y != @y * 128
return true
else
return false
end
else
return moving?
end
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
if $game_switches[Scroll_game_switch]
last_moving = moving?
unless scroll_moving? or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
case Input.dir4
when 2
move_down
when 4
move_left
when 6
move_right
when 8
move_up
end
update_move
end
last_real_x = @real_x
last_real_y = @real_y
super
unless moving?
if last_moving
result = check_event_trigger_here([1,2])
if result == false
unless $DEBUG and Input.press?(Input::CTRL)
if @encounter_count > 0
@encounter_count -= 1
end
end
end
end
if Input.trigger?(Input::C)
check_event_trigger_here([0])
check_event_trigger_there([0,1,2])
end
end
else
scroll_update
end
end
#--------------------------------------------------------------------------
# * Update Move
#--------------------------------------------------------------------------
def update_move
if $game_switches[Scroll_game_switch]
screen = [$game_map.display_x,
$game_map.display_y,
$game_map.display_x + 640*4 - 128,
$game_map.display_y + 480*4 - 128]
distance = 2 ** @move_speed
if @y * 128 > @real_y
@real_y = [[@real_y + distance, @y * 128].min, screen[3]].min
@real_x = [[screen[0], @real_x].max,screen[2]].min
if @real_y == screen[3]
@y = @real_y / 128
end
end
if @x * 128 < @real_x
@real_x = [[@real_x - distance, @x * 128].max, screen[0]].max
@real_y = [[screen[1], @real_y].max,screen[3]].min
if @real_x == screen[0]
@x = @real_x / 128
end
end
if @x * 128 > @real_x
@real_x = [[@real_x + distance, @x * 128].min, screen[2]].min
@real_y = [[screen[1], @real_y].max,screen[3]].min
if @real_x == screen[2]
@x = @real_x / 128
end
end
if @y * 128 < @real_y
@real_y = [[@real_y - distance, @y * 128].max, screen[1]].max
@real_x = [[screen[0], @real_x].max,screen[2]].min
if @real_y == screen[1]
@y = @real_y / 128
end
end
if @walk_anime
@anime_count += 1.5
elsif @step_anime
@anime_count += 1
end
else
super
end
end
#--------------------------------------------------------------------------
# * Update Stop
#--------------------------------------------------------------------------
def update_stop
super
if $game_switches[Scroll_game_switch]
screen = [$game_map.display_x,
$game_map.display_y,
$game_map.display_x + 640*4 - 128,
$game_map.display_y + 480*4 - 128]
@real_x = [[screen[0], @real_x].max,screen[2]].min
@real_y = [[screen[1], @real_y].max,screen[3]].min
end
end
end
Jens