RMMZ BattleManager battler issues

ferallag

Veteran
Veteran
Joined
Aug 5, 2020
Messages
38
Reaction score
4
First Language
english
Primarily Uses
RMMV
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...
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
Which class did you add the continueTpbChargeTime function to?
 

ferallag

Veteran
Veteran
Joined
Aug 5, 2020
Messages
38
Reaction score
4
First Language
english
Primarily Uses
RMMV
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...
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
Why not just write the function for Game_Actor instead, and then when you call it make sure battler.isActor() is true?
 

ferallag

Veteran
Veteran
Joined
Aug 5, 2020
Messages
38
Reaction score
4
First Language
english
Primarily Uses
RMMV
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?
 

ferallag

Veteran
Veteran
Joined
Aug 5, 2020
Messages
38
Reaction score
4
First Language
english
Primarily Uses
RMMV
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
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
Yeah, that's exactly what I had in mind. :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top