I'd like to hide the timer in the upper right corner, but only for a particular event, not all events. Any clever way to do it?
Hiding the timer?
RPG Maker MV SupportCreate a loop, then have it tick down a variable and apply a wait time. Then when the variable hits zero, break the loop and have it do whatever "Timer" event you wanted.
Hmm yeah, that's one way to do it, but it's also a parallel process that you can't have too many of and the ticks are going to be performance-dependent, so it's not ideal.
Setting the opacity of the timer sprite to 0 works for me 🙂
Code:
SceneManager._scene._spriteset._timerSprite.opacity=0
Code:
SceneManager._scene._spriteset._timerSprite.opacity=255
Bonus Info:
Code:
SceneManager._scene._spriteset._timerSprite.opacity=0;
var _gt_onExpire = Game_Timer.prototype.onExpire;Game_Timer.prototype.onExpire = function() {
_gt_onExpire.apply(this, arguments);
$gameSwitches.setValue(1, true);
SceneManager._scene._spriteset._timerSprite.opacity=255;
this.stop();
};
Code:
SceneManager._scene._spriteset._timerSprite.opacity=0;var _gt_onExpire = Game_Timer.prototype.onExpire;Game_Timer.prototype.onExpire=function(){_gt_onExpire.apply(this, arguments);$gameSwitches.setValue(1, true);SceneManager._scene._spriteset._timerSprite.opacity=255;this.stop();};
What that does...
...Set the timer sprite opacity to 0
...Alias the function "onExpire" of the Game_Timer Object
...Do what it usually does then add code (optionally just overwrite completely)...
Demo added code:
- Sets switch #1 to true
- Sets opacity to 255
- Stop the timer (so it doesn't show "00:00")
perfect, thank you!
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/hiding-the-timer.119628/