Save-Point

Full Version: Autoscrolling Panoramas
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

RPG Advocate

Autoscrolling Panoramas
by RPG Advocate
saved from Phylomortis.Com


Introduction
This script adds support for scrolling panoramas. The panorama can be scrolled simultaneously in both the horizontal and vertical directions and works for panoramas of any size. To set a panorama to autoscroll, use the "Script" event command to change the variables "$game_system.autoscroll_x_speed" and "$game_system.autoscroll_y_speed".

Each frame, the panorama will scroll one pixel for each eight speed units. For example, if you want the panorama to scroll one pixel every four frames, use a speed value of 2. For the horizontal and vertical directions, positive speeds scroll the panorama to the right and up, respectively, while negative speeds scroll left and down. Please be aware that the scrolling attributes are retained when changing maps, so set both speeds to 0 before switching maps if you don't want the new panorama to scroll.


Demo
>Click<


Script
Autoscrolling Panoramas
Here's what it says when the game starts:
No methodError
undifined method width for nil:NilClass
What should I do about it?
On which line does this error occur and do you have a 'panorama' set in that tileset?