> You just need to find the closest non-hit enemy then.
I've tried around a bit now and it still somehow does not work.
I've copyed your code, the only things that have been changed have been the instance variables to fit mine. Yet somehow something is wrong!
I've tried deactivating the first code you sent me (like in your most recent code) I've tried putting some code over to the other, I've tried having both of them on, and I've tried everything in between, yet still it sometimes keeps targeting an enemy far away and other wonky stuff.
It probably has something to do with the functions. I cannot add the function on shooting the weapon because of how I want the weapon to act. I may describe how I want the weapon to act very simply right now:
I want it to shoot out fast projectiles quickly that go straight ahead (with the Bullet behaviour) and when they hit any enemy while any enemy is nearby it should then "bounce" or rather fly straight to said enemy. They will bounce a few times before destroyed.
So by this description your code works quite well, and you've done a good job, but I do not see why it does not work for me.
I'm so very sorry for bothering you so much, and I am extremely grateful for the amount of help you're putting into this, thank you very much.
Do you have any other ideas to how this could work?
I also forgot to add a picture of the code, so here it is prnt.sc/uowmq2