@OnslaughtSupply , this is really what I was looking for. Unfortunately, I must have did something wrong.
So I put this exact script in the state "Poison", I battle tested with just Actor 1 only and when she gets inflicted with the state, her face doesn't
change and the pop-up occurs.
To be clear, "Poison" has no turn count nor does it end in battle unless Actor 1 uses an item to nullify the state, but when I give the Poison state the turn count and when the turns are over, Actor 1 turns invisible.
I'm not sure if it has something to do with the file names I put in beside the "var" sections or what. Here's the script I did based on Yanfly's script:
--------------------------------------------------------------------------------
<Custom Apply Effect>
if (user.isActor()) {
user._prevCharName = user._prevCharName || user._characterName;
user._prevCharIndex = user._prevCharIndex || user._characterIndex;
user._prevFaceName = user._prevFaceName || user._faceName;
user._prevFaceIndex = user._prevFaceIndex || user._faceIndex;
user._prevBattlerName = user._prevBattlerName || user._battlerName;
if (user.actorId() === 1) {
var charName = 'RK DracoRoy - Sprite Pack 1';
var charIndex = 0;
var faceName = 'RK DracoRoy - Luna';
var faceIndex = 2;
var battlerName = 'RK DracoRoy - Luna's Battle Sprite';
} else if (user.actorId() === 2) {
var charName = 'RK DracoRoy - Sprite Pack 1';
var charIndex = 1;
var faceName = 'RK DracoRoy - Kamui';
var faceIndex = 2;
var battlerName = 'RK DracoRoy - Kamui's Battle Sprite';
} else if (user.actorId() === 3) {
var charName = 'RK DracoRoy - Sprite Pack 1';
var charIndex = 2;
var faceName = 'RK DracoRoy - Roy';
var faceIndex = 2;
var battlerName = 'RK DracoRoy - Roy's Battle Sprite';
} else if (user.actorId() === 4) {
var charName = 'RK DracoRoy - Sprite Pack 1';
var charIndex = 3;
var faceName = 'RK DracoRoy - Lilina';
var faceIndex = 2;
var battlerName = 'RK DracoRoy - Lilina's Battle Sprite';
}
user.setCharacterImage(charName, charIndex);
user.setFaceImage(faceName, faceIndex);
user.setBattlerImage(battlerName);
user.refresh();
}
</Custom Apply Effect>
<Custom Remove Effect>
var charName = user._prevCharName;
var charIndex = user._prevCharIndex;
var faceName = user._prevFaceName;
var faceIndex = user._prevFaceIndex;
var battlerName = user._prevBattlerName;
user.setCharacterImage(charName, charIndex);
user.setFaceImage(faceName, faceIndex);
user.setBattlerImage(battlerName);
user._priorityCharacterName = undefined;
user._priorityCharacterIndex = undefined;
user._prevFaceName = undefined;
user._prevFaceIndex = undefined;
user._priorityFaceName = undefined;
user._priorityFaceIndex = undefined;
user._prevFaceName = undefined;
user._prevFaceIndex = undefined;
user._priorityBattlerName = undefined;
user._prevBattlerName = undefined;
user.refresh();
</Custom Remove Effect>
----------------------------------------------------------------------------
Here is the pop-up that came and just in case, here are the pictures of the files for just Actor 1. I do wonder what mistake I made that caused this pop-up to occur. Such as turning invisible when a state is over, and not changing her face.