//=============================================================================
// 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);
};
})();