I have a boss monster which transforms in mid battle. I put the immortal status on it, in the first form, but after the transform the status is gone. I try to put it on in a battle event, but it does not seem to apply to the second form.
Here's the transform, which works.
◆Script:var enemyIndex = $gameVariables.value(1) - 1; //Troop index
:Script:var enemyFromId = $gameVariables.value(2);
:Script:var enemyIntoId = $gameVariables.value(3);
:Script:var enemy = $gameTroop.members()[enemyIndex];
:Script:var flickerCount = 0;
:Script:
:Script:function flickerTransform()
:Script:{
:Script: if (flickerCount <= 7)
:Script: {
:Script: //Alternate between temporary and final forms
:Script: if (flickerCount % 2 === 0)
:Script: {
:Script: enemy.transform(enemyFromId);
:Script: }
:Script: else
:Script: {
:Script: enemy.transform(enemyIntoId);
:Script: }
:Script: //Wait for x milliseconds
:Script: setTimeout(() =>
:Script: {
:Script: flickerCount++;
:Script: flickerTransform();
:Script: }, 250);
:Script: }
:Script:}
:Script:
:Script:flickerTransform();
After the Transform I try to apply the Immortal state again, but the enemy name (RoastPumpkin) isn't in the dropdown list, so I use the enemy ID #1, which is the original boss:
◆Change Enemy State:#1 Pumpkinhead, + Immortal
◆Change Enemy State:#1 Pumpkinhead, + Guard
◆Change Enemy State:#1 Pumpkinhead, + HP Regeneration
However, it is not applying the states. I suspect the transform is generating a new enemy ID, which doesn't exist yet when I code in the Change State commands. How do I apply the Immortal state to the second form?
Here's the transform, which works.
◆Script:var enemyIndex = $gameVariables.value(1) - 1; //Troop index
:Script:var enemyFromId = $gameVariables.value(2);
:Script:var enemyIntoId = $gameVariables.value(3);
:Script:var enemy = $gameTroop.members()[enemyIndex];
:Script:var flickerCount = 0;
:Script:
:Script:function flickerTransform()
:Script:{
:Script: if (flickerCount <= 7)
:Script: {
:Script: //Alternate between temporary and final forms
:Script: if (flickerCount % 2 === 0)
:Script: {
:Script: enemy.transform(enemyFromId);
:Script: }
:Script: else
:Script: {
:Script: enemy.transform(enemyIntoId);
:Script: }
:Script: //Wait for x milliseconds
:Script: setTimeout(() =>
:Script: {
:Script: flickerCount++;
:Script: flickerTransform();
:Script: }, 250);
:Script: }
:Script:}
:Script:
:Script:flickerTransform();
After the Transform I try to apply the Immortal state again, but the enemy name (RoastPumpkin) isn't in the dropdown list, so I use the enemy ID #1, which is the original boss:
◆Change Enemy State:#1 Pumpkinhead, + Immortal
◆Change Enemy State:#1 Pumpkinhead, + Guard
◆Change Enemy State:#1 Pumpkinhead, + HP Regeneration
However, it is not applying the states. I suspect the transform is generating a new enemy ID, which doesn't exist yet when I code in the Change State commands. How do I apply the Immortal state to the second form?