I'm currently putting some finishing touches on fleeing monsters, but am still dealing with a particularly irritating little error. I have a script set up in a troop that makes an enemy attempt to flee at low HP, but it also triggers when the enemy is brought straight to 0, and I haven't found a way to fix that.
My script currently looks like this in the Troop page:
Even with that script, when an attack brings an enemy down to 0, it triggers the flee attempt. I can't figure out what exactly I did wrong.
PS: Before I make a whole separate thread about it... When you allow the enemy to flee, it forces the enemy to use the Escape action. Is there a script call to check if an enemy has fled? I realize it's a special effect rather than a state, so I don't know how exactly you would check this.
My script currently looks like this in the Troop page:
Even with that script, when an attack brings an enemy down to 0, it triggers the flee attempt. I can't figure out what exactly I did wrong.
PS: Before I make a whole separate thread about it... When you allow the enemy to flee, it forces the enemy to use the Escape action. Is there a script call to check if an enemy has fled? I realize it's a special effect rather than a state, so I don't know how exactly you would check this.