Advertisement
Maliki79

MalCustomGameOverME

Apr 26th, 2025 (edited)
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //=============================================================================
  2. // Maliki's Custom Game Ove ME
  3. // MalCustomGameOverME.js
  4. // version 1.0a
  5. //=============================================================================
  6. /*:  
  7. * @plugindesc ver1.0a - Allows devs to set custom Music to GameOver Scene.  
  8.  *@author Maliki79
  9.  *
  10.  * @help Use the below Script calls to change music from the default one chosen in the database.
  11.  *
  12.  * SCRIPT CALLS
  13.  *
  14.  * $gameSystem.setCustomGOME(name);
  15.  * This call will enter the file in the game's ME folder to be used at the game over screen.
  16.  * (Remeber to use "quotes" and omit the file extension)
  17.  * If you leave the name blank, the ME will return to the default ME.
  18.  */
  19.  
  20. var MalGOMEInitialize = Game_System.prototype.initialize;
  21. Game_System.prototype.initialize = function() {
  22. MalEncounterInitialize.call(this);
  23. this._customGOME = "";
  24. }
  25.  
  26. Game_System.prototype.setCustomGOME = function(name) {
  27. if (name) {
  28.     this._customGOME = name;
  29.     } else {
  30.     this._customGOME = "";
  31. };
  32. }; 
  33.  
  34. Scene_Gameover.prototype.playGameoverMusic = function() {
  35.     AudioManager.stopBgm();
  36.     AudioManager.stopBgs();
  37.     var name = $gameSystem._customGOME;
  38.     var sound = $dataSystem.gameoverMe;
  39.     if (name !== "") sound.name = name;
  40.     AudioManager.playMe(sound);
  41. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement