Hi!
I am trying to make a dynamic Battle Face system with WAY_CustomFaceImageEval, which includes the characters reacting whenever they get hit.
However, I ran into the issue where the State "Hit", which I use to determinate when an actor got hit by an enemy, only seem to work once per turn even when the actor gets hit by two or more enemy during the turn.
I use the following relevant plugins
As of the code itself I use for the face evaluation, here it is (Not sure how relevant is it rn, but I'd rather just include as much as possible)
And I use the following code for the Action Sequence
I feel like i MUST be missing something somewhere along the line, but I just can't figure out what exactly it is and I know other games have figured out how to make it work so it must be possible in some way...
I am trying to make a dynamic Battle Face system with WAY_CustomFaceImageEval, which includes the characters reacting whenever they get hit.
However, I ran into the issue where the State "Hit", which I use to determinate when an actor got hit by an enemy, only seem to work once per turn even when the actor gets hit by two or more enemy during the turn.
I use the following relevant plugins
Yanfly's Battle Status Window To show the actor's faces during battle
Yanfly's Battle Engine Core (I kinda Have To)
Yanfly's Battle System - CTB
Yanfly's Action Sequence Pack 1 to add and remove the relevant states during the skills
WAY_CustomFaceImageEval to change the Actor's faces during battle
Yanfly's Buffs & States Core in order to have more control over States
Yanfly's Battle Engine Core (I kinda Have To)
Yanfly's Battle System - CTB
Yanfly's Action Sequence Pack 1 to add and remove the relevant states during the skills
WAY_CustomFaceImageEval to change the Actor's faces during battle
Yanfly's Buffs & States Core in order to have more control over States
As of the code itself I use for the face evaluation, here it is (Not sure how relevant is it rn, but I'd rather just include as much as possible)
<Custom Face Image Eval>
//Knocked Out
if (user.isStateAffected(1)) {
faceName = 'xx_Battle_Test_2';
faceIndex = 3;
//Take Damage
} else if (user.isStateAffected(13)) {
faceName = 'xx_Battle_Test_2';
faceIndex = 1;
//Stunned
} else if (user.isStateAffected(4)) {
faceName = 'xx_Battle_Test_2';
faceIndex = 5;
//Attack
} else if (user.isStateAffected(14)) {
faceName = 'xx_Battle_Test_2';
faceIndex = 4;
//Receiving Heal Or Buff
} else if (user.isStateAffected(15)) {
faceName = 'xx_Battle_Test_2';
faceIndex = 7;
//Low Health (30%)
} else if (user.hp / user.mhp <= 0.3) {
faceName = 'xx_Battle_Test_2';
faceIndex = 2;
//Basic
} else {
faceName = 'xx_Battle_Test_2';
faceIndex = 0;
}
</Custom Face Image Eval>
//Knocked Out
if (user.isStateAffected(1)) {
faceName = 'xx_Battle_Test_2';
faceIndex = 3;
//Take Damage
} else if (user.isStateAffected(13)) {
faceName = 'xx_Battle_Test_2';
faceIndex = 1;
//Stunned
} else if (user.isStateAffected(4)) {
faceName = 'xx_Battle_Test_2';
faceIndex = 5;
//Attack
} else if (user.isStateAffected(14)) {
faceName = 'xx_Battle_Test_2';
faceIndex = 4;
//Receiving Heal Or Buff
} else if (user.isStateAffected(15)) {
faceName = 'xx_Battle_Test_2';
faceIndex = 7;
//Low Health (30%)
} else if (user.hp / user.mhp <= 0.3) {
faceName = 'xx_Battle_Test_2';
faceIndex = 2;
//Basic
} else {
faceName = 'xx_Battle_Test_2';
faceIndex = 0;
}
</Custom Face Image Eval>
And I use the following code for the Action Sequence
<whole action>
add state 13: target
add state 14: user
collapse: target
</whole action>
<follow action>
remove state 13: target
remove state 14: user
clear battle log
</follow action>
add state 13: target
add state 14: user
collapse: target
</whole action>
<follow action>
remove state 13: target
remove state 14: user
clear battle log
</follow action>
I feel like i MUST be missing something somewhere along the line, but I just can't figure out what exactly it is and I know other games have figured out how to make it work so it must be possible in some way...