Save-Point
I setup a transformation skill with Visustella plugins and I keep getting an error - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: I setup a transformation skill with Visustella plugins and I keep getting an error (/thread-13665.html)



I setup a transformation skill with Visustella plugins and I keep getting an error - Rose Guardian - 07-31-2026

I setup a character transformation skill using the Visutella plugins and I keep getting this error every time I use the skill. EDIT: I uploaded a demo of the error with the paid content strippedĀ  DemoOFError.zip - Google Drive

[Image: yv5T6TI.png]


[Image: ojoE7M2.png]


This is the state linked to the skill:

[Image: nADY0lV.png]


These are the plugins I'm using.

[Image: X7ExNtK.png]

This is the code in the state note box.

JS On Add State>
if (user.isActor()) {
user._prevCharName = user._characterName;
user._prevCharIndex = user._characterIndex;
user._prevFaceName = user._faceName;
user._prevFaceIndex = user._faceIndex;
user._prevBattlerName = user._battlerName;
if (user.actorId() === 1) {
var charName = 'NIckSprite2';
var charIndex = 0;
var faceName = 'ME_PoG_Faces';
var faceIndex = 1;
var battlerName = 'Nick_Light_WerewolfBattle';
}
user.setCharacterImage(charName, charIndex);
user.setFaceImage(faceName, faceIndex);
user.setBattlerImage(battlerName);
user.refresh();
}
</JS On Add State>

<JS On Erase State>
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();
</JS On Erase State>


What I don't understand is this worked before and now it won't. I don't know what I did wrong this time. If anyone knows how to fix this please tell me as soon as possible. I want the error out of the way. The transformation skill is needed in my game. If there is another way to do this by making the character change back after a certain number of turns please tell me.