I have a certain enemy only do an attack when it has 90%+ of his total HP, and another one if he has less than that, the point being that you have to hit it first so it doesn't use his more powerful attack.(the one with 90%+ of HP)
but it doesn't do what I tell him to do, even with less that 90% he STILL uses the powerful attack. Actually the problem seems to be that the program checks the attack conditions, BEFORE the turn starts, so if he has 100% of his HP and then I hurt him and THEN he attacks, the program still checked that it had full HP... I know this because for the next turn, he doesn't do it anymore, and all the attack conditions work, but 1 turn later...
Is there any way to make the program check the attack conditions not before the turn, but just before the enemy attacks?
but it doesn't do what I tell him to do, even with less that 90% he STILL uses the powerful attack. Actually the problem seems to be that the program checks the attack conditions, BEFORE the turn starts, so if he has 100% of his HP and then I hurt him and THEN he attacks, the program still checked that it had full HP... I know this because for the next turn, he doesn't do it anymore, and all the attack conditions work, but 1 turn later...
Is there any way to make the program check the attack conditions not before the turn, but just before the enemy attacks?