I have a problem. My AI keeps choosing targets that should not be available.
This is the situation
1- The AI has one ability "Shoot" that has one condition in the Target Selection Setting where the Combatant Target status in NOT from factionA
2- The only MoveAI Enemy detection condition is that the status is in NOT from factionA
3-The Battle AI setting only uses the ability "Shoot"
When playing the game the AI keeps switching between valid targets and targets from factionA :(

Is there anything else I'm missing that could affect the target selection ?
  • If the battle AI doesn't find a valid action (e.g. shoot not finding a valid target) the combatant falls back to using the base attack, might be that that's what's going on?
    Try adding a battle AI with None action as the last battle AI of the combatant to do nothing instead.

    Also, is that condition set up as Target Condition or Auto Target Condition in the target selection settings of the ability? Only Target Condition will make a combatant an invalid target if the conditions are not met.

    The Ability node of the battle AI also has the Force Found Targets option that can overrule other target selections. So if that's enabled it could also cause this.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I made sure everything is set that way you recommended (no base attacks, no auto target conditions) but:
    1- the player doesn't use the ability even when the Player is withing detection range (Player is part of the Player faction)
    2- the MoveAI try to go towards targets that shouldn't be picked (Vegetation is part of the naure faction)
    image
    MoveAI
    image
    Ability
    image
  • Well, move AI targeting and action targeting (or battle AI targeting) are different things, unless your battle AI only uses targets that are detected by the move AI.
    An action targeting something can tell the move AI to move toward the target if it's out of range, though - so if some action of the combatant is used that targets the vegetation it'd tell the move AI to go there until it's in use range.

    Overall hard to say - I guess I'd need that setup in the test project to check out directly, or is it already in the latest one I have?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I'm going to send you the latest packages via email :)
Sign In or Register to comment.