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 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.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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
I've updated the how-to on battle AIs to bring more light into these 2 settings.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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?
Found Targets handles what happens to previously found targets, Target defines which combatants will be checked (not found targets).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!