Only one ranged enemy fires?

So, I’m making a silly roguelike dungeon crawler and I can’t figure out how to make ranged enemies work. When I go to test them, they work perfectly find if there’s only one. But any more and it’ll choose a random one to shoot, and the others do nothing. This and the enemy not facing the player are the two most annoying bugs for me rn, so any help would be appreciated, thanks!

(Here’s the link to the game btw, to test it select whatever difficulty, then debug then area 2. The enemy code is in one of the functions on the right, just scroll down to find the ranged enemy, looks like a peashooter thingie. https://arcade.makecode.com/S71020-90464-99476-31455)

2 Likes

Up! Having the same problem