I tested it on RMMV and it worked perfectly, I don't have the RMMZ to test, if anyone can check it for me.
Update: Option to hide timer included.
In theory I know it works, but I don't remember if there might be some incompatibility:
Update: Option to hide timer included.
In theory I know it works, but I don't remember if there might be some incompatibility:
JavaScript:
/*:
* @plugindesc Pause GameTimer
* Version: 0.2 - Test only
* @author DevWithCoffee
*
* @help Plugin: Game_Timer-Pause.js
*
* Pause and Resume GameTimer
* Compatibility: MV and MZ
*
* Commands:
* $gameTimer.pause()
* $gameTimer.resume()
*
* @param Hide timer
* @type Boolean
* @desc Hide timer when paused
* @default false
*
*/
(() => {
var parameters = PluginManager.parameters("Game_Timer-Pause");
Game_Timer.prototype.initialize = function() {
this._frames = 0;
this._working = false;
this._pause = false;
};
Game_Timer.prototype.pause = function() {
if (parameters['Hide timer'] == "true") {
this._working = false;
}
this._pause=true;
}
Game_Timer.prototype.resume = function() {
if (parameters['Hide timer'] == "true") {
this._working = true;
}
this._pause=false;
}
Game_Timer.prototype.update = function(sceneActive) {
if (sceneActive && this._working && this._frames > 0 && this._pause == false) {
this._frames--;
if (this._frames === 0) {
this.onExpire();
}
}
};
})();
