YME_LevelUpSe - Jan 14, 2016
Creator name: Yumineko
Overview
Plays a sound effect when level up
Features
- Sound effect is played when level up where the text is displayed. (battle included)
- Short code length.
Put the name of the sound file as a value for "SE Name" parameter.
Note: For a sound effect to play when using Change Level event, put a check next to "Show Level Up."
Credit and Thanks: Yumineko
Terms of Use- Free for commercial and non-commercial use.
License - MIT License: http://opensource.org/licenses/mit-license.php
Code: - //=============================================================================
- // YME_LevelUpSe.js
- //=============================================================================
- /*:
- * @plugindesc Plays a sound effect when level up
- * @author Yumineko
- *
- * @param SE Name
- * @desc Specify the file name of the sound effect.
- * @default Up1
- *
- * @param SE Volume
- * @desc Volume adjustment of the sound effect. 0~100
- * @default 100
- *
- * @param SE Pitch
- * @desc Sound Effect Pitch (speed) adjustment. 50~150
- * @default 100
- *
- * @help Sound effect is played when level up where the text is displayed. (battle included)
- *
- * This plugin is under the terms of MIT license. (please check the website for more info.)
- * http://opensource.org/licenses/mit-license.php
- *
- */
- (function() {
- var parameters = PluginManager.parameters('YME_LevelUpSe');
- var seName = String(parameters['SE Name'] || 'Up4');
- var seVolume = Number(parameters['SE Volume'] || 100);
- var sePitch = Number(parameters['SE Pitch'] || 100);
- //var displayLevelUp = Game_Actor.prototype.displayLevelUp;
- var upSE = {"name":seName,"pan":0,"pitch":sePitch,"volume":seVolume}
- Game_Actor.prototype.displayLevelUp = function(newSkills) {
- var text = TextManager.levelUp.format(this._name, TextManager.level, this._level);
- $gameMessage.newPage();
- $gameMessage.add(text);
- newSkills.forEach(function(skill) {
- $gameMessage.add(TextManager.obtainSkill.format(skill.name));
- });
-
- AudioManager.playStaticSe(upSE);
- //displayLevelUp.call(this(newSkills);
- };
-
-
- })();
复制代码
You can download js file from the thread attachment or Dropbox link: https://www.dropbox.com/s/ie9co2dfq5c5ktc/YME_LevelUpSe.js?dl=1
本贴来自国际rpgmaker官方论坛作者:ovate处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址: https://forums.rpgmakerweb.com/threads/level-up-sound-effect.78611/ |