I worked on this all day and I absolutely cannot figure out what is wrong. Probably something really simple, but I'm just not seeing it.
I have an enemy that checks to see if it's touching one of two imagepoints on a player object =
Enemybbox (inverted) X = Player_Target.ImagePointX(1) | Player_Target.ImagePointX(2)
If it does not (meaning the above script is true), a instance variable on Enemybbox called "EnemyAction" is set to a text value of "CHASE". This causes the enemy to move towards either of the Player's two imagepoints. That all works fine.
However, when the enemy reaches one of the player's imagepoints, I want to switch the instance variable from "CHASE" to "FIGHT", stop moving, and start following a new set of commands listed under an Enemybbox EnemyAction="FIGHT" action. The enemy does stop (because it reaches the imagepoint), but I can't get the variable to change. Even when it's stopped and when I have actions that tell the variable to switch to "FIGHT" once it's reached the imagepoint, in the debugger, it still shows the EnemyAction value as "CHASE".
Inverting the above script does not work (example below), and I've also tried this with global variables and it didn't work either.
Enemybbox X = Player_Target.ImagePointX(1) | Player_Target.ImagePointX(2) Set EnemyAction to "FIGHT"
I really want to use variables because I need to have different states for the enemy (chase, fight, hit, dead, evade, etc). Any help would be greatly appreciated!