I decided to make a thread for all those little neat things I discover tinkering with javascript. (that haven't been requested yet) These aren't really plugins, but rather scripts that do a thing like what the engine is supposed to do, but may not be well known.
___________________________________________________________
My first thing, I just learned is that changes to game $gameSystem._windowTone happen instantly, so you can use it to make flashing windows. There may be a plugin that does this, but it can really be done with plain javascript.
This can be acheived without plugin, via event script call...
And to turn off... EDIT: Oops! forgot to add (this)... It was broken, but I fixed it. I should have tested first... another one of those IIFE event script gotchas, for me...
___________________________________________________________
These neat little things never cease to amaze me. Post neat little things you've discovered/learned too.
___________________________________________________________
My first thing, I just learned is that changes to game $gameSystem._windowTone happen instantly, so you can use it to make flashing windows. There may be a plugin that does this, but it can really be done with plain javascript.
This can be acheived without plugin, via event script call...
PHP:
if(this.colorInterval === undefined){
var rand255 = function(){return Math.round(Math.random()*255)};
this.reTone = $gameSystem._windowTone;
this.colorInterval = setInterval(function(){
$gameSystem._windowTone = [rand255(),rand255(),rand255()];
}, 100);
}
PHP:
clearInterval(this.colorInterval);
delete this.colorInterval;
$gameSystem._windowTone = this.reTone;
These neat little things never cease to amaze me. Post neat little things you've discovered/learned too.