random title display on start

WorldWakeSTU

Veteran
Veteran
Joined
Feb 5, 2015
Messages
95
Reaction score
6
Primarily Uses
TitleScreenRandomImgSelector version 2.0
WorldWakeSTU

Introduction
This script is for setting the title screen background to a random image of a selected group when the game starts.

Features
displays images from an array at random

Screenshots
currently no screenshots are available.

(this only changes the title background so showing it do that is a little hard for me.)

How to Use
under titleScreens in the plugin manager and the names of the images like so:

Castle,DemonCastle,Crystal

Demo
currently no demo available.

Script

/****************************************
 TitleScreenRandomImgSelector_v2.js
****************************************/

/*:
 * @plugindesc Displays a random background image for the title screen.
 * @author WorldWakeSTU
 *
 * @param TitleScreens
 * @desc The number of images being used for random selection on the title scene.
 * Default: DemonCastle,Castle,Crystal
 * @default DemonCastle,Castle,Crystal
 *
 *@help
 *-------------------------------------------------------------------
 * Free for non commercial and non-commercial use.
 * Version 2.0
 *-------------------------------------------------------------------
 *
 * --------------------------------------------------------------------------------
 * Required Files
 * --------------------------------------------------------------------------------
 * image name in array with no spaceing or ""
 *
 * --------------------------------------------------------------------------------
 * Version History
 * --------------------------------------------------------------------------------
 * 2.0 - TitleScreenRandomImgSelector_v2
 * -- changed how the images are obtained. * 1.0 - TitleScreenRandomImgSelector
 *//*
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *|                                    |
 *|        complete plugin    12/1/2015    |
 *|                                    |
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 */


            

 /*******************************************************************************
 *        WorldWakeSTU personal patch
 *******************************************************************************/
(function() {
    var parameters = PluginManager.parameters('TitleScreenRandomImgSelector_v2');
    var selectedImageArray = parameters['TitleScreens'].split(/\s*,\s*/) || ['Castle','DemonCastle','Crystal'];
    console.log(selectedImageArray);
        Scene_Title.prototype.createBackground = function() {
            this._backSprite1 = new Sprite(ImageManager.loadTitle1(selectedImageArray[Math.randomInt(selectedImageArray.length)]));
            this._backSprite2 = new Sprite(ImageManager.loadTitle2($dataSystem.title2Name));
            this.addChild(this._backSprite1);
            this.addChild(this._backSprite2);
        }
})();
 
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I forgot I had an account on rpgmakercentral lol
"What do you think the best place to visit on this cold days?" "Hell..."
Been so busy lately that I wonder if I should slowly start preparing the advent calendar resources so I have enough in december.
Man, I wish it was harder for mean d-holes to make me feel like crying.
Made 8 games. Was aiming for 20. Gonna go for 40. Because 20 + 20. /Bed.

Forum statistics

Threads
94,538
Messages
921,721
Members
124,402
Latest member
KINGty
Top