Mechanics of wall-to-wall fights like in the game - Kingdom

Good afternoon, I wanted to make the mechanics of battles like in the game - “Kingdom”, i.e. side view and wall to wall. But it’s not very clear how to handle collisions between groups of units, let’s say when 1 unit strikes, it automatically hits all enemy targets, but it should only hit 1, is there some condition that will only work on the first target? I tried to scatter each unit by UID and check if more than 1 target UID takes damage. Tried to set a condition - to work only 1 time. If you have any ideas, I’d be happy to hear them.

There is condition pick nearest object
But that would require it being nearest object B to object A so all would depend on formation
I have no idea how game you describe looks
But why not just create object like a square even leave it with blank image
And simply move it onto enemy you want to attack before attack?
Or make like marker/indicator like arrow down above enemy which enemy will be attacked and you can use that to determine which enemy will take hit

1 Like

Indeed, as I forgot about this condition, it is perfect for checks by UID. Thank you)

1 Like

Haha. What a coincidence, I am also working on a Kingdom-like game. Its not too big a deal but I’ve also had trouble with a single bullet managing to damage multiple enemies at once. Good luck on your game fellow monarch!
Also, what does UID mean?

A unique identifier assigned to each object upon creation. Simplifies logical comparisons.

1 Like