So in my game, I was looking at changing actor faces with states. I found this forum that gave me the command using yanfly's buffs and states core to change the face for the actor when states are applied.
One of my actors ages throughout the game so I plan on using the change actor images command to do that. So the issue would be that I would want it to run a command in battle to check what face image is currently being used so I would be able to switch the sprite to a different one based on the characters age. Would I just do that by increasing a variable every time the actor ages up and the command would look like this:
I'm not great with js so I'm not completely sure if that would work so if there's something I'm missing or any other way to do this that would be great to know.
<Custom Apply Effect>
if (target.isActor()) {
if (target.actorId() === 1) {
target.setFaceImage('filename', index);
} else if (target.actorId() === 2) {
target.setFaceImage('filename', index);
} else if (target.actorId() === 3) {
target.setFaceImage('filename', index);
}
}
</Custom Apply Effect>
<Custom Remove Effect>
if (target.isActor()) {
if (target.actorId() === 1) {
target.setFaceImage('filename', index);
} else if (target.actorId() === 2) {
target.setFaceImage('filename', index);
} else if (target.actorId() === 3) {
target.setFaceImage('filename', index);
}
}
</Custom Remove Effect>
if (target.isActor()) {
if (target.actorId() === 1) {
target.setFaceImage('filename', index);
} else if (target.actorId() === 2) {
target.setFaceImage('filename', index);
} else if (target.actorId() === 3) {
target.setFaceImage('filename', index);
}
}
</Custom Apply Effect>
<Custom Remove Effect>
if (target.isActor()) {
if (target.actorId() === 1) {
target.setFaceImage('filename', index);
} else if (target.actorId() === 2) {
target.setFaceImage('filename', index);
} else if (target.actorId() === 3) {
target.setFaceImage('filename', index);
}
}
</Custom Remove Effect>
JavaScript:
<Custom Apply Effect>
if (target.isActor()) {
if (target.actorId() === 1) {
{
if (gameVariables.value(1) == 0)
target.setFaceImage('filename', index);
}
else if (gameVariables.value(1) == 1)
target.setFaceImage('filename', index)
}
} else if (target.actorId() === 2) {
target.setFaceImage('filename', index);
}
}
</Custom Apply Effect>