Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
As you can see when I attack an enemy it attacks them both. If I don't select an enemy at the start it will produce an error. When I kill them both it only gives me xp for one enemy.
If you're using the variable health, don't.
If you're doing something like oEnemy.hp-=10 then you need to make sure the part on the left is an instance ID, not an object ID.
Like how TheouAegis has suggested. In the attack obj, run a with command which will run the code for each instance of obj enemy. Each instance of obj enemy will know if it was selected or not by checking enemy_selected