Ok, so i'll try to explain this best as I can. So, in my game, you can go up to enemies and fight them, my game is a platformer. I have code set up for enemy movement, and I have set up detectors for when an enemy spots you. When an enemy spots you, a little alert animation plays when you get too close to the detector, the enemy then approaches and tries to hit you. That's all fine and good, but my problem is that when you leave the detection area, and collide with the detector again, the animation plays all over again. Why this is a problem is that it plays even when the enemy is walking towards you, the animation plays. I only want to have it play once, so when the enemy is walking towards you they don't play the animation mid-fight, as of course that would look strange and buggy. Is there anyway to get it to play once? Furthermore, is there anyway for them to play the animation once while they are also walking?
Sorry, I know this is a lot to take in, but once you look at the mfa my rant will make sense; hopefully. I tried everything, but I don't think I have the experience to make it work. It was immediately obvious to try to use limit conditions and run the event once, but when I do that, the alert animation doesn't play again, so I'm trying to get the action to loop, but only once every time.