Hey all,

I am currently struggling with getting my enemies to do precisely what I want given the conditions of the battle. Right now I am working on a battle where the enemy combatants gain new abilities when their allies die, and so they need to use the new abilities according to a few different conditions. Generally, this is just a priority system, when they unlock an ability they should use it, when it is on cooldown use the next ability, and so forth.

I think the biggest problem I'm having is not understanding exactly how to use the 'Found Targets' setting of the Check Status/Get Weighted Group/Check Grid Distance nodes.

My rudimentary understanding is that when I go to start checking targets to perform an ability I should use 'Clear', then as I go through more checks to determine the ultimate target, I should use 'Keep' or maybe 'Check' (not clear why or how checkkeep is used). Then if a suitable target is not found, or the ability is not usable for whatever reason, I should do another 'Clear' to start evaluating targets for the next ability in the priority.

In practice though, my enemy seems almost to be acting at random.

I'm finding it really hard to put into words, but I just need to know exactly what situations I need to be using the different options for Found Targets. Is there one that is kind of like a default, and the other 3 have specific use cases? Any insight or explanation beyond what is available in the Editor help is greatly appreciated.

Let me know if I'm off about any of these assumptions:

Keep: all found targets that passed previous checks are still kept in the eligible target list, and then new ones evaluated by this step can be added to the list.

Check: all found targets that passed previous checks are still kept in the eligible target list, then they also get checked against this steps's conditions and removed if they dont match. And then also, other unchecked targets can be added to the list if they match the requirement.

Clear: all previously found targets are removed from the eligible target list, then new targets can be added to the list if they match the requirements of this step

Check keep: all found targets that passed previous checks are still kept in the eligible target list regardless if they match the requirement of this step, then also other unchecked targets can be added to the list (how does a situation like that even arise?)



Sorry for the long-winded rant - Thanks so much for taking the time!



  • You can find more information on how the battle AI works in this how-to.
    There's also some example setups as part of the game tutorial series.

    Generally, if an Action isn't used (e.g. due to not knowing the ability or having enough MP), the battle AI will just continue to the next node.
    As for the found targets:
    - Keep will just keep the previously found targets in the list, use this if you just want to add additional targets to the list.
    - Check will also check the previously found targets and remove them if they don't match the conditions, use this if you want to further filter the list.
    - Clear will remove all previously found targets, use this to get a clean new target list to start from.
    - Check Keep will check the previously found targets without removing them (i.e. the node will continue with Success in case one of the targets matches the conditions). This use case might not be that clear, but it's there to also have the previously found targets contribute to the node's check success or fail without removing them.

    Also, keep in mind that you can use the None target to only perform checks on the found targets. E.g. using Check Keep with this would allow to check the found targets for conditions but still keeping them in case it fails, so that you can perform other checks on them.
    If you're enjoying my products, free updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.