target priority

Users who are viewing this thread

Amman d Stazia

Master Knight
OK, first up: I searched.  It crashed the site 3 times.

So let's assume nobody has addressed this question before, okay?

Family d'Stazia would like to know HOW do AI troops decide which enemy to aim at?

Is it the closest enemy?  Or the highest-level enemy?  Or the highest-level of the 10 closest enemies?

answers please!!
 
Well. Since the targets are moving, and the time between the clicking command and when the actual projectile hits is to different that the target could of moved and the closest target is now another man.

So I guess they do it like this...

A soldier has a circle around him that determines the range of every enemy. So inside of this circle can he reach with his weapon and will fire on the one who enters it
1-1.jpg


like this... But in this case. The targeting options is only one. So it isn't such a hard way to figure out who he would fire at.

But. If it looks like it does in this scenario, it will be a bit more difficulties.
2-1.jpg


but what he does here is to messure out who is the closest target when he begins to fire. But. Sadly enough, both the red dot and the green dot is on the same distance. Well then he haves to choose. Then the easiest way to solve this is do just choose on randomly. But because that would look like the bot had 5 IQ, is there a smarter way to figure it out. The AI adds the 5 yards that the green dots distance is with the red dots 5 yard distance. Which gives the AI 10 yards. Now the AI is searching for a target that in the 10 yard distance and is in sight of the AI. So that will result in that if three men is charging against a armed man, will the armed man fire against the most obvious target. Instead of turning around and finding a new target. And if it doesn't find that. It will randomize a target to fire at.

Allthough. I am not sure if this is the way Mount & Blade do it. But it is the most commun, and most cunning way to do it.. So far..
 
bjorne. said:
Well. Since the targets are moving, and the time between the clicking command and when the actual projectile hits is to different that the target could of moved and the closest target is now another man.

So I guess they do it like this...

A soldier has a circle around him that determines the range of every enemy. So inside of this circle can he reach with his weapon and will fire on the one who enters it
1-1.jpg


like this... But in this case. The targeting options is only one. So it isn't such a hard way to figure out who he would fire at.

But. If it looks like it does in this scenario, it will be a bit more difficulties.
2-1.jpg


but what he does here is to messure out who is the closest target when he begins to fire. But. Sadly enough, both the red dot and the green dot is on the same distance. Well then he haves to choose. Then the easiest way to solve this is do just choose on randomly. But because that would look like the bot had 5 IQ, is there a smarter way to figure it out. The AI adds the 5 yards that the green dots distance is with the red dots 5 yard distance. Which gives the AI 10 yards. Now the AI is searching for a target that in the 10 yard distance and is in sight of the AI. So that will result in that if three men is charging against a armed man, will the armed man fire against the most obvious target. Instead of turning around and finding a new target. And if it doesn't find that. It will randomize a target to fire at.

Allthough. I am not sure if this is the way Mount & Blade do it. But it is the most commun, and most cunning way to do it.. So far..

Nice.  I'm assuming that when he turns to fire, the circle turns with him.  In that case, if someone sneaks up behind them, they won't fire.  When i sneak up behind archers they don't fire, but they do turn and draw their weapons, usually
 
well. I donno if it is like this in mount & blade b(but this is the most commun way). And if he turns it is because he is using sense two. And that is when someonw is moving against him. It is when someone  isn't in the circle but someone is moving towards him.
 
Back
Top Bottom