- Joined
- Aug 3, 2022
- Messages
- 5
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- RMMZ
I'm trying to get a state to tie a enemies health to a variable so another enemy in the same troop can be transformed into it and it's HP remains the same. bonus points if someone can also help me make it so every enemy in the troop dies when a enemy who has this state currently dies.
This is my current code:
<JS On Add State>
target.hp = ($gameVariables.value(94));
</JS On Add State>
<JS On Erase State>
$gameVariables.setValue(94, target.hp);
</JS On Erase State>
<JS Post-Damage As Target>
if (target.hp <= 0 || target.isDead()) {
}
</JS Post-Apply As Target>
This is my current code:
<JS On Add State>
target.hp = ($gameVariables.value(94));
</JS On Add State>
<JS On Erase State>
$gameVariables.setValue(94, target.hp);
</JS On Erase State>
<JS Post-Damage As Target>
if (target.hp <= 0 || target.isDead()) {
}
</JS Post-Apply As Target>