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,956
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,956
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,956
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 Profile Posts

YES! officially released my games soundtrack on Itunes, Spotify, and Amazon..... kinda cool!

Another old age version of Reid. Trying out different style.
Hey everyone! Not sure how many people know about Cafofo Music on Itch.io, but I highly recommend their Sound Effects! It is amazing quality AND quantity and best of all, they are having a 50% sale! I can't express how much I love sales.
Wow.... My last map GIF got 47 likes, 16 retweet and 2,105 views on Twitter in 24 hours. My game thread here's only got 3k views in 6-7 months. I guess building my Twitter was insanely worth it. :LZSexcite:

Forum statistics

Threads
105,594
Messages
1,014,883
Members
137,264
Latest member
ZeoValinferno
Top