I am trying to make it so this code will
1. If a Target dies in battle it will be knocked out
2. It will lose one Life Point
I have got the else part of the code to work where if all party members are taken from the party it's a game over. I just cannot get the first part to work correctly I tried many combinations any help would be appreciated.
Here is my code
I tried
target.$gameVariables.setValue(16, -1);
$gameVariables.setValue(16, -1);
and even the original code "target.lifePoints--;" That @ATT_Turan made for me who was the original maker of this code.
1. If a Target dies in battle it will be knocked out
2. It will lose one Life Point
I have got the else part of the code to work where if all party members are taken from the party it's a game over. I just cannot get the first part to work correctly I tried many combinations any help would be appreciated.
Here is my code
<Custom Respond Effect>
if ($gameParty.inBattle() && target.hp <= 0)
{
if (target.lifePoints>0)
{
// Play the death animation.
target.startAnimation(65);
// Set the target to state knockout.
target.setstate(1);
// Decrement life points
target.$gameVariables.setValue(16, -1);
}
else
{
// Play death animation
$gameVariables.setValue(15, -1);
target.startAnimation(65);
// Remove actor from party
if ($gameParty.aliveMembers().length>0)
$gameParty.removeActor(target._actorId);
if ($gameParty.aliveMembers().length<0)
} SceneManager.goto(Scene_Gameover);
}
</Custom Respond Effect>
if ($gameParty.inBattle() && target.hp <= 0)
{
if (target.lifePoints>0)
{
// Play the death animation.
target.startAnimation(65);
// Set the target to state knockout.
target.setstate(1);
// Decrement life points
target.$gameVariables.setValue(16, -1);
}
else
{
// Play death animation
$gameVariables.setValue(15, -1);
target.startAnimation(65);
// Remove actor from party
if ($gameParty.aliveMembers().length>0)
$gameParty.removeActor(target._actorId);
if ($gameParty.aliveMembers().length<0)
} SceneManager.goto(Scene_Gameover);
}
</Custom Respond Effect>
I tried
target.$gameVariables.setValue(16, -1);
$gameVariables.setValue(16, -1);
and even the original code "target.lifePoints--;" That @ATT_Turan made for me who was the original maker of this code.