This small, simple scriptlet allows you to change the parallax image with a single script call in the Event Commands.
Parallaxes are pre-defined and can be manually called or randomized.
Version: | 2.6 |
Author: | Companion Wulf |
Platform: | RMVX |
Script Type: | Scriptlet |
Required: | None |
Fileseze: | 5 Kb |
File Format: | TXT |
Release Date: | 10 September 2012 |
Last Update: | 22 May 2014 |
Parallaxes are graphics (usually of clouds or distant landscapes) that can scroll behind a map. While it is possible to set the parallax graphic in the map settings only, this "one parallax per map" rule is rather annoying.
So, as I start learning RGSS and familiarize myself with its nuances, being able to find workarounds and tweaks is half the fun.
This is a simple but effective (and certainly not perfect) method for changing parallaxes during gameplay with a small script.
Parallaxes can be randomized (default setting) or called directly by specifying the corresponding number.
With this method, if the Loop Coordinates aren’t set directly on the map (via the Map Properties), the parallax will remain static. By changing the Horizontal Loop and/or Vertical Loop settings here it will make the parallax graphic scroll in the background.
If the randomized parallax (RANDOM_PARALLAX) is "true", the parallaxes will be chosen randomly from the list (PARALLAX_NAMES). If RANDOM_PARALLAX is "false", the default parallax (PARALLAX_DEFAULT) will be used instead, corresponding to its position in the array.
To call the script, place the following in a script command event:
$game_map.change_parallax
To change the parallax to a specific one in the list, place the corresponding number (starting with 0) in brackets after the event command:
$game_map.change_parallax(2)
This will show the "Mountains" parallax from PARALLAX_NAMES (in the default expample, the third in the array).
- XY scroll coordinates
- Terrain specific parallaxes
You must log in to post a comment.