RPG Maker Forums

For display on the map itself. This is as far as I got:

function Window_DashStamina() { this.initialize.apply(this, arguments); }
// Inherit from base window
Window_DashStamina.prototype = Object.create(Window_Base.prototype);
// Set Constructor
Window_DashStamina.prototype.constructor = Window_DashStamina;

// Constructor
Window_DashStamina.prototype.initialize = function(x, y, width, height) {
    Window_Base.prototype.initialize.call(this, x, y, width, height);
    this._helpWindow = null;
    this._handlers = {};
    this._touching = false;
    this.deactivate();
    alert('window created');
};

// Update
Window_DashStamina.prototype.update = function() {
    Window_Base.prototype.update.call(this);
    console.log('updating'); // Erm... How do I hook this into the window_base update without an alias (because we inherit from Window_Base)... This is never called.
    // Update stamina bar
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var alias_SceneMapOnMapLoaded = Scene_Map.prototype.onMapLoaded;
Scene_Map.prototype.onMapLoaded = function() {
    alias_SceneMapOnMapLoaded.apply(this, arguments);
    this.dashStaminaWindow = new Window_DashStamina(10,10,100,64);
}
There is no error, but also no window... The alert message in the constructor is shown so the window is created.

Also the update method is never called.

Also I suppose that I have to dispose or close the window in Scene_Map.prototype.terminate to prevent memory leaks?

But I think windows don't update themselves. Meaning I probably have to alias the update method in the scenemanager and make it update my window.

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,466
Members
137,821
Latest member
Capterson
Top