MZ BattleManager battler issues

I'm trying to create an end of action sequence that doesn't rest the TPB to zero. but i want it to only efffect the PlayerCharacters.

this is the code that i'm working with in manager

BattleManager.endBattlerActions = function(battler) {
battler.setActionState(this.isTpb() ? "undecided" : "done");
battler.onAllActionsEnd();
battler.clearTpbChargeTime();
this.displayBattlerStatus(battler, true);
};
i created a new function called continueTpbChargeTime() which basically does not rest the TPB!
HOWEVER! obviously it effects the enemies also.
HOW would i be able to make it only effect the players and not the enemey...
Which class did you add the continueTpbChargeTime function to?
Game_Battler.prototype.continueTpbChargeTime = function() {
this._tpbState = "charging";
//this._tpbChargeTime = 0;
};
I used the same clearTpbChargeTime function , just // the chargetime=0
it works like intended on the playercharacters , i just want the enemies to not be effected...
Why not just write the function for Game_Actor instead, and then when you call it make sure battler.isActor() is true?
mmm i'll try that.
do you mean basically
Game_Actor.prototype.continueTpbChargeTime = function() {
this._tpbState = "charging";
};
and in

BattleManager.endBattlerActions = function(battler) {
battler.setActionState(this.isTpb() ? "undecided" : "done");
battler.onAllActionsEnd();
if (battler.isActor())
battler.continueTpbChargeTime();
else
battler.clearTpbChargeTime();
this.displayBattlerStatus(battler, true);
};

is this whatyou have in mind?
looks like its working as intended ...however sometimes the enemies simply stop attacking, especially when the actors use the guard button... i'm going to playtest some more and figure out whats going on! thanks a lot! i'll be back with more info later
Yeah, that's exactly what I had in mind. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/battlemanager-battler-issues.126288/