What exactly does this block do? I'm trying to build a BattleAI whose purpose is to remove moveAI Hunting targets that have been previously acquired in a real time battle based on statuses (e.g. is target dead?, is target hiding?). Note that this is different from the settings in the MoveAI since there it only prevents detection but once hunt has started, it won't stop it even if those hunt conditions are violated.

Here's my approach:
1. Check Move AI Target (Enemy, Clear Targets) - ON Success:
2. Check Status (Is Dead, Enemy, Check Found Targets) - On Success:
3. Call LoseTarget Ability that sets the user's MoveAI to Idle

I have 4 player combatants. If I send one combatant at a time to attack the enemy, this works. That is, when the player combatant dies, the enemy combatant first goes Idle and then immediately begins going to his waypoints from the MoveAI - great.

However, if I engage the enemy with a second player character while the first dead player character is near (the player characters that die don't despawn), I get a strange behavior. It seems that although the enemy combatant Hunts and Attacks the new, alive player, he still triggers the LoseTarget ability every so often, making his moveAI switch temporarily to idle - I have debuging things set up to confirm the Idle setting is coming from my LoseTarget ability / AI. Note that the enemy combatant also has an "Is Not Dead" Hunting condition, but is likely still detecting the dead combatant, though never hunting him. Dead combatants can also never be targeted by the BattleAI, and all BattleAI actions have 'Force Found Targets' on them, so I'm not sure what is going on here then.

Is the Check Move AI Target block selecting more combatants than the one that the MoveAI is currently moving toward? Is it selecting all the ones that detected?



  • The Check Move AI Target step checks if combatants are the current target of the move AI of the battle AI's user. It'll add all combatants that are move AI targets to the target list.
    The battle AI steps add those combatants to the list that match the condition, e.g. if you're checking for dead combatants, the dead combatants will be added to the list. If you want not dead combatants, you'll need to check with Is Dead disabled.
    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!
  • edited March 2016
    Well I'm trying to make sure that the combatant that is being hunted is not dead.

    So for example:
    Single combatant approaches enemy and dies (but doens't despawn) - enemy goes back to patrolling.
    Two combatants approach an enemy and one dies - enemy stops chasing the first combatant and focuses on the second combatant.

    All of this works great with my setup. The issue is that when dead combatants are around (e.g. within detection range of the move AI) but NOT being the target the move AI is currently moving toward, and also NOT being targeted or attacked by the battleAI abilities, this process:

    1. Check Move AI Target (Enemy, Clear Targets) - ON Success:
    2. Check Status (Is Dead, Enemy, Check Found Targets) - On Success:
    3. Call LoseTarget Ability that sets the user's MoveAI to Idle

    still leads to LoseTarget being called.

    So when you say 'all combatants that are move AI targets' can the move AI have multiple targets, or is the move AI target just the target the AI is moving toward at the time of the check? If the move AI can only have one target, and that target is the one that the combatant is currently moving toward, then my list of 3 steps should not be triggering the third step when a Dead combatant is around, because, if I understand correctly, the first step in my list should ONLY pass on the target that the move AI is moving toward, and that target is NOT dead. Then, when the second step uses 'Check Found Targets' again, my assumption is it will only check that target that got selected in the first step, which is very alive, and therefore not triggering step 3.
    Post edited by Juryiel on
  • That's only expected if there is a dead enemy - the Check Status step using Enemy will check all combatants - use the None target to not check additional combatants and only check the found targets.
    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!
  • edited March 2016
    OH my god, so THAT's how those work! Wow I totally misinterpreted those. I thought that if I select the 'Check' next to 'Found targets' it would ONLY check the targets that were found.

    Instead, 'Check' will decide which of the already found targets to keep, but then also add any other targets? Is this correct? If so I have to revisit a few of my AIs :)

    Thanks! That did fix it!
    Post edited by Juryiel on
  • edited March 2016
    Yes, that's how it works - Found Targets handles what happens with previously found targets (i.e. keep them, only use that that are valid with the step's check or remove them all). The other Target setting handles which additional combatants will be checked and added (if valid) to the target list.
    Post edited by gamingislove on
    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!
  • You're not alone @Juryiel - I thought exactly as you did. This just explained some weird edge cases I see sometimes in my own AIs. Holy craps. Knowledge!
    My little chunk of the internet: http://artemic.com
  • edited March 2016
    Yes, I always conceptualized target selection as destructive, e.g. select as many as possible, then select a smaller group FROM that first group, then a yet smaller group, etc etc, until you arrive at your final group of targets. Instead, it's generally constructive (with some destructive elements when you pick 'Check' and 'None'), e.g. select this small group of targets, add to it this other group of targets, until you arrive at your final group of targets :) A lot of things make sense now that were confusing me before :)
    Post edited by Juryiel on
  • Does no one read the help texts? :D
    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 totally do :)

    The 'Found Targets' just says, "Select how previously found targets will be handled", and the 'Target' part says "Select which combatant groups will be checked". While this totally accurately describes how it actually works, it also coincidentally describes how I thought it worked :)

    Yup yup, this totally fits my incorrect interpretation that 'Keep' will just keep all the targets (and the block checks will only determine whether to go to Success or Failed path, rather than add any new targets), 'Check' will use the block settings to check the already selected targets, and 'Clear' will select entirely new targets. And so if you select something like 'Check' and 'Enemy' it will ONLY check the 'Enemy' targets previously found, rather adding more targets. See, this totally wrong interpretation is still not contradictory to the description text :D Reading the 'None' text makes it clear in retrospect (with the e.g. part).

    It's really tough to write descriptions that can't be reinterpreted to fit whatever the user already believes to be true, especially when there's such a flexible system with so many things that can be done :)

    For the 'Target' description you could maybe do something like "Select which combatants not currently in the found targets list will be checked and ADDED to the found targets list. " or something along those lines. I'm sure we'll still find ways to misinterpret it though. Good thing you're around a lot and accessible to set things straight :D
  • Yeah, probably should make that more specific :D
    I've updated the how-to on battle AIs to bring more light into these 2 settings.
    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!
  • Definitely very helpful :)

    Since you have lots of space in the tutorial you might consider some examples.

    Maybe one example where you pick a bunch of targets, then both 'Check' them and also add more in the same step. I'm still not 100% clear on what 'Check' will do when used with a 'Target' of, say, 'Enemy'. E.g. will such a block check all enemies not in the 'Found Targets' list and all enemies in the 'Found Targets' list, OR will it check all targets (both allies and enemies) in the 'Found Targets list' but only enemies for targets that are not added to that list?
  • The Found Targets and Target settings have nothing to do with each other.
    Found Targets handles what happens to previously found targets, Target defines which combatants will be checked (not found targets).
    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!
Sign In or Register to comment.