Hey forum,
I simply want to make a script, where the name of the game map appears after x amount of time (frames) passes.
I copied some stuff from the Window_Message class, however, the _waitCount value goes directly to 0.
How do I tell MV to wait x amount of frames?
What am I missing here?
Thanks for help!
I simply want to make a script, where the name of the game map appears after x amount of time (frames) passes.
I copied some stuff from the Window_Message class, however, the _waitCount value goes directly to 0.
How do I tell MV to wait x amount of frames?
What am I missing here?
JavaScript:
function Window_MapLocation () {
this.initialize.apply(this, arguments);
}
Window_MapLocation.prototype = Object.create(Window_Base.prototype);
Window_MapLocation.prototype.constructor = Window_MapLocation;
Window_MapLocation.prototype.initialize = function (x ,y , width, height) {
Window_Base.prototype.initialize.call(this, x, y, width, height);
this._waitCount = 0;
this.startWait(100);
this.drawLocation();
};
Window_MapLocation.prototype.drawLocation = function (){
var n = $gameMap._mapId;
if (this.updateWait() === true) {
return this.updateText();
} else {
this.drawText("LOCATION // ",0,0,this.width,"left");
this.changeTextColor(mainColor1);
this.drawText($dataMapInfos[n].location,105,0,this.width,"left");
this.resetTextColor();
this.drawText($dataMap.displayName,105,25,this.width,"left");
}
};
Window_MapLocation.prototype.updateText = function() {
this.updateWait();
this.drawLocation();
};
Window_MapLocation.prototype.updateWait = function() {
if (this._waitCount > 0) {
this._waitCount--;
return true;
} else {
return false;
}
};
Window_MapLocation.prototype.startWait = function(count) {
this._waitCount = count;
};
Thanks for help!