Panorama Mover 1.1

Panorama Mover
Version: 1.1

Introduction
This little script allow you to move the Panorama.

Features
  • Move the panorama of n x and m y
  • Auto panorama movement in specificated map.


Screenshots
No needed

Script
script Show
#===============================================================================
# Panorama Mover 1.1
#===============================================================================
# The Sleeping Leonhart
# Version 1.0
# 23-8-2007
#===============================================================================
# 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 Panorama_Mover
  # AUTOSCROLL_MAP = {map_id => [x movement, y movement]
  AUTOSCROLL_MAP = { 1 => [2,1]
  }
  # this is for the map not declarated in the hash don't touch if you dont know
#what are you doing
  AUTOSCROLL_MAP.default = [0,0]
end
class Game_Map
  attr_reader   :panorama_ox
  attr_reader   :panorama_oy
  alias tsl_game_map_setup setup
  def setup(map_id)
    tsl_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 tsl_game_map_update update
  def update
    tsl_game_map_update
    move_panorama(Panorama_Mover::AUTOSCROLL_MAP[@map_id][0],Panorama_Mover::AUTOSCROLL_MAP[@map_id][1])
  end
end

class Spriteset_Map
alias tsl_spriteset_map_update update
  def update
    tsl_spriteset_map_update
    @panorama.ox += $game_map.panorama_ox
    @panorama.oy += $game_map.panorama_oy
  end
end
Expand to see the code.


Instructions

Look in the script, all the instruction is there.

FAQ

Waiting....

Compatibility

It must be compatible with everytihng.
Why would we want this???
RPG Maker XP doesn't have 'auto-scrolling panorama' feature unlike RPG Maker 2k/2k3.
I don't get it, anyway good job.
Quote:
I don't get it, anyway good job.


Basically, it allows the panorama to move like fogs do.
cool , tnx dude ..
You know, Dubealex made a quite advanced version of this script.

http://www.creationasylum.net/index.php?showtopic=94


But anyways, nice script!
I definitely see the wisdom in this script... and am fully happy with it, and will definitely credit you in my game for it...

Thank you!

For future versions, however... you should work on making it to where the transition from x1,y1 to x2,y2 has a period of frames, to give the appearance of actual movement, would look AWESOME in a FFX world map idea where you could have a viewport with events, and clicking on a certain event scrolls the panorama to point on the map with a brief outline of it, difficulty level, and asking you if you want to go there...

I love the script! thanks!

And as far as Dubleaux's script goes... it IS great for scrolling backgrounds at certain speeds, but this goes TO a point on a panorama and stops, which makes it perfect....
AND I might add, if someone wanted to go ahead and do the steps to the indivual spot, it DOES appear to move in ANY direction to that spot, where Dubleaux's only goes in 8 directions.
EDIT: Yeah, it works, even though it's a sharp transition without any actual scrolling by steps... I did this.

Created a 'world map' of about 2000 x 2000, and set that as the panorama of my 'map room'... then on an event switch (psuedo menu system) I placed a "action button" event that said...

@Change Map Settings:Panorama = 'world1',0
$game_map.move_panorama(500,200)
Text: Kanosar Mound
Show Choices: Go There?,Choose Again
:  When [Go There]
$game_map.move_panorama(-500,-200)
Transfer Player yada yada
:  When [Choose Again]
$game_map.move_panorama(0,0)
Expand to see the code.


Unfortunately, though, the only snag is that you DO have to reset the positioning for the new map, or be ready to do some real graphing on your map that you'd be using to understand the ins and outs of moving from point a to point b... for instance, in my map, my Kanosar Mound might be at 500,200, but my Fort Whateverthehell, might be at 185,300... and then, if you're going to a map with a different panorama, just make sure that you reset the panorama back to it's initial position (0,0) with whatever spline you need, in this case, (-185,-300) and open the scene.

Easily solved if you want to do transitions that way...
just have a variable be 5... for instance (the Kanosar) and that if the event you click is for Fort whatever, while you're at location 5. you'd just implement a (-315,100) transition, and back and forth you could go...

But really... work on the animation transition it might be REALLY perfect then...

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=27254