- Joined
- Dec 16, 2016
- Messages
- 1,054
- Reaction score
- 1,801
- First Language
- English
- Primarily Uses
- N/A
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
You can download js file from the thread attachment or Dropbox link: https://www.dropbox.com/s/ie9co2dfq5c5ktc/YME_LevelUpSe.js?dl=1
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
Attachments
Last edited: