I had a game mechanic in mind that I can't quite wrap my head around in terms of the programming and I was hoping someone could help me out.
In my game, you are dropping bombs while sidescrolling above onto enemies down below. One of the power ups I wanted to make available to players allows the bomb to drop, and then hit the nearest available target. However, since there are multiple enemies on the ground that are constantly moving, I'm struggling to make the bomb hit anything specifically, and it ends up moving in one random direction. I would like it to detect, move to, and hit the closest by enemy on the ground.
Any ideas on how I could go about doing this? Normally I'd post my MFA, but it's a bit of a mess right now. I can create a mock up if anyone needs a better idea of what I mean, but any help is appreciated on my end!