You're right, removing the line of sight stuff from the 'for each' event fixed everything. Weird! Thank you for the help.
I am having another logic flaw issue that I can't untangle that maybe you could help me with as well. I have a state for the enemy attacking that creates a hitbox every time a countdown variable reaches 0 (along with setting the enemy to the attack animation):
It subtracts 1*dt from the countdown whenever the enemy's state is 6, and at 0 the attack happens and it resets to 1. In theory, this should work for each skeleton individually since it's under the 'for each' event.
But it doesn't. When more than one skeleton is in range at once, it creates dozens of hitboxes at once even though I have those 'trigger once' actions set. At 3 skeletons it stops subtracting from both their countdowns. As more skeletons come in range it gets even more broken. What am I doing wrong now?
https://www.dropbox.com/s/jpn6loz49rm41 ... .capx?dl=0
Here is the updated capx file for you to fiddle with.