Scrolling Panorama
#1
Scrolling Panorama by Regashi (A.k.A Legacy)

version: 0.1


introduction:
After seeing a few people wanting this, including myself, i decided to create a very simple scrolling paranoma script.
so enjoy ^_^

How to use:

Call the script from an event using this syntax:
Code:
$game_map.move_panorama(x,y)
or set up the Auto feature like so.
Code:
#AUTOSCROLL_MAP = {map_id => [x movement, y movement]
  AUTOSCROLL_MAP = {   }

place above main, and below Scene_debug.

Script:
Code:
#===============================================================================
# ~** [Regashi] Scrolling Panorama **~                              
#-------------------------------------------------------------------------------
#  Author:      Regashi
#  Version:     0.1
#  Build Date:  2010-03-24
#  Last Update: 2010-04-30
#-------------------------------------------------------------------------------
#  This little script allow you to move the Panorama.
#  You can move the panorama with this command
#  $game_map.move_panorama(x,y).
#  Else you can compile the AUTOSCROLL_MAP hash for an auto movement in
#  specificated map.
#===============================================================================
module Regashi
  #AUTOSCROLL_MAP = {map_id => [x movement, y movement]
  AUTOSCROLL_MAP = {   }
  AUTOSCROLL_MAP.default = [0,0]
end

class Game_Map
  attr_reader   :panorama_ox
  attr_reader   :panorama_oy
  
  alias regashi_game_map_setup setup
  def setup(map_id)
    regashi_game_map_setup(map_id)
    @panorama_ox = 0
    @panorama_oy = 0
  end
  def move_panorama(x,y)
    @panorama_ox += x
    @panorama_oy += y
  end
  
  alias regashi_game_map_update update
  def update
    regashi_game_map_update
    move_panorama(Regashi::AUTOSCROLL_MAP[@map_id][0],Regashi::AUTOSCROLL_MAP[@map_id][1])
  end
end

class Spriteset_Map
alias regashi_spriteset_map_update update
  def update
    regashi_spriteset_map_update
    @panorama.ox += $game_map.panorama_ox
    @panorama.oy += $game_map.panorama_oy
  end
end

Script Compatiblity problems:

This script will most likely not work with any script modifing the Game_Map, a list of incompatible scripts will be listed here, when found. And eventualy patches to conter these problems.
Reply }


Messages In This Thread
Scrolling Panorama - by Legacy - 05-03-2010, 01:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Another Scrolling Text Script kyonides 1 6,477 04-12-2010, 01:36 AM
Last Post: Shiroiyuki
   Smooth Scrolling Script Toby Zerner 0 6,456 03-07-2008, 05:24 AM
Last Post: Toby Zerner
   Panorama Edit ParaDog 0 4,196 03-04-2008, 04:47 AM
Last Post: ParaDog



Users browsing this thread: 1 Guest(s)