I managed to fix the Hexen problem in the Infinite Stamina Plugin by myself.
The '$gameVariables.setValue(2714, 0);' need to be inside 'Game_Map.prototype.update'.
if (allowInfiniteStamina) { // if "true" then don't run out of stamina
// Reset stamina counter back to 0
Game_Map.prototype.update = function (sceneActive) {
Game_Map.prototype.update = function (sceneActive) {
this.refreshIfNeeded();
if (sceneActive) {
this.updateInterpreter();
}
this.updateScroll();
this.updateEvents();
this.updateVehicles();
this.updateParallax();
if (this._useUltraMode7) {
this.updateUltraMode7();
}
$gameVariables.setValue(2714, 0); //HERE
};
};
}
Thank you for looking into this and posting a fix for the problem!
After looking at the code i think i messed up some lines of code, specifically:
TY_Game_Map_Update.call(this, arguments); This needs to be this instead -> TY_Game_Map_Update.call(this, ...arguments);
TY_Game_Map_SetupEvents.call(this, arguments); This needs to be this instead -> TY_Game_Map_SetupEvents.call(this, ...arguments);
There's no need to paste the whole original "Game_Map.prototype.update" contents since that's what this line of code is meant to do "TY_Game_Map_Update.call(this, ...arguments);"