Advertisement
Maliki79

MalTitleME

Oct 21st, 2017
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //=============================================================================
  2. // Maliki's Title ME Changer
  3. // MalTitleME.js
  4. // version 1.0
  5. //=============================================================================
  6. /*:  
  7.  * @plugindesc ver1.0 - Allows you to set a ME to play as you Title Screen music.  This will prevent the mucis from looping.
  8.  * @author Maliki79
  9.  *
  10.  * @param Title ME
  11.  * @desc ME to start playing at Title Screen.
  12.  *
  13.  * @param Title ME volume
  14.  * @desc Volume level of ME.  (number must be between 0 and 100)
  15.  * @default 100
  16.  *
  17.  * @param Title ME pitch
  18.  * @desc Pitch level of ME.  (number must be between 1 and 300)
  19.  * @default 100
  20.  *
  21.  * @param Title ME pan
  22.  * @desc Pan level of ME.  (number must be between -100 and 100)
  23.  * @default 0
  24.  *
  25.  * @help In order to use this plugin, you must first decide which ME you want
  26.  * and make sure the file is IN YOUR me FOLDER.
  27.  * Pick the name of the ME and put it's file name
  28.  * in the parameters section.
  29.  * (No need for " marks.)
  30. */
  31.  
  32. var MalTitleMusic = PluginManager.parameters('MalTitleME');
  33.  
  34. MalTitleMusic.MTitleME    = String(MalTitleMusic['Title ME']) || '';
  35. MalTitleMusic.MTitleVol   = Number(MalTitleMusic['Title ME volume']);
  36. MalTitleMusic.MTitlePitch = Number(MalTitleMusic['Title ME pitch']);
  37. MalTitleMusic.MTitlePan   = Number(MalTitleMusic['Title ME pan']);
  38.  
  39.  
  40. Scene_Title.prototype.playTitleMusic = function() {
  41.     var sound = this.buildSound();
  42.     if (sound) AudioManager.playMe(sound);
  43.     AudioManager.stopBgm;
  44.     AudioManager.stopBgs();
  45. };
  46.  
  47. Scene_Title.prototype.buildSound = function () {
  48.     var sound = {
  49.         name:   MalTitleMusic.MTitleME,
  50.         volume: MalTitleMusic.MTitleVol,
  51.         pitch:  MalTitleMusic.MTitlePitch,
  52.         pan:    MalTitleMusic.MTitlePan
  53.     };
  54.     console.log(MalTitleMusic.MTitleME);
  55.     return sound;
  56. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement