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
Spoiler/****************************************
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);
}
})();
本贴来自国际rpgmaker官方论坛作者:WorldWakeSTU处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/random-title-display-on-start.51955/