Hi, I'm currently making a top-down action shooter. Basically, what I want to happen is when an enemy shoots and hits the player they swap positions with that enemy. My problem is when I have multiple instances of that enemy. When one of their bullets hits the player, all instances of the enemy end up swapping places with the player.
Currently my set up is when the enemy has line of sight to the player, it shoots by spawning a bullet in front of it moving forwards at the angle it was facing. Is there a way for each bullet instance spawned to be tied to the specific enemy that spawned it (so that it recognizes which enemy the player swaps places with)? Or is there another way I need to be approaching the bullet spawning so that each bullet instance spawned is already tied to the enemy that spawned that bullet?
I'm relatively new to Construct2, so I'm not too clear with some of the particular actions I'm allowed to make sprites do. I've been winging it this past week through trial and error and I really can't find a solution to this. Any help would be appreciated.