I'm having a problem where my AI's are always targeting the main player, even when there are additional combatants within the active player group. I'm using a grid battle system. I've got three battle AI's attached to the enemy combatants (detailed below.) I'm sure I've missed something but not sure what.
Find Target
- Clear found targets -> then a series of check grid distance nodes at 3/5/10/30/50/100 to find enemies, with success leading to Move Into Distance and failure leading to the next distance check (if all fail it leads to a None node)
Move Into Distance
- Check Grid Distance is Equal 1: success -> Rotate to target; fail -> Check Grid Distance is greater than 1: success -> grid move toward target (if reachable -> rotate to target); fail -> Rotate to target.
Attack Enemy
- Grid Rotate to target -> Check Grid Distance is equal 1: success -> chance fork to determine which sword swing attack to use; else fail in grid distance check -> use all-out-defense ability.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
How's your Check Grid Distance node set up?
Also, if it's just about finding the nearest enemy, you can use a Get Nearest node instead.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I missed the Get Nearest node! Thanks. That was what I was looking for. =) They are still prioritizing the player over anyone else. Get Nearest is currently set up:
Found targets -> enabled
Target -> enemy
exclude found targets disabled
ignore height distance disabled
ignore radius disabled
nearest offset index 0
use grid distance enabled
block diagonal distance 1 disabled
ignore size cells enabled
Inverse order disabled
Do you have any other grid-move battle AI set up that could be used before this?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Battle AI 0: Find Target
Battle AI 1: Move Into Distance
Battle AI 2: Attack Target
Under AI settings, AI controlled is checked. Target Selection Settings has Nearest Target checked, aggression type is always... that's basically it. It doesn't have any move AI's enabled.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!