So consider the following image:
We see here that if Enemy 1 has 100% or less hp that we then loop and in said loop check if this enemy has the state Charmed applied.
This wont work, because the loop is always running, so the battle and the game essentially break. If I remove the loop then this page is run once, and because at the time it's run he doesn't have charmed attached to him, the console will be show the message as shown above.
If at any point in the battle he has charmed applied, I never see the message box.
What is the proper way to say: If enemy has x health and state y applied, then do z and have it, through out the battle, check: "do you have this state? No, carry on. Else, lets do something."
We see here that if Enemy 1 has 100% or less hp that we then loop and in said loop check if this enemy has the state Charmed applied.
This wont work, because the loop is always running, so the battle and the game essentially break. If I remove the loop then this page is run once, and because at the time it's run he doesn't have charmed attached to him, the console will be show the message as shown above.
If at any point in the battle he has charmed applied, I never see the message box.
What is the proper way to say: If enemy has x health and state y applied, then do z and have it, through out the battle, check: "do you have this state? No, carry on. Else, lets do something."