I have a battle where there are two enemies, and one of the abilities they cast depends on them both being alive. I've tried a number of different ways using the Check Status node, including Target: All, which I understand checks if _any_ combatant is dead (player or enemy). At any rate, it always goes to the Failed option next.

Any help is appreciated. An example is attached. Thanks

image
  • I have a battle where there are two enemies, and one of the abilities they cast depends on them both being alive.
    Check Status isn't the ideal node to use in this case. What you want to do is use Select Combatant to store the two enemies in their own data types. Then use Change Variable to store their current Hp in a Int variable by referencing the selected data of the combatants. Then use Check Variable to see if each of their Hp is above 0.
    Nodes like Check Status is used to store/change the active Targets for the ability being used. You simply want to determine if an ability should be used based on data from the combatants.
  • Since you want the enemy to check if their allies are alive, you need to use the Ally target. Also, depending on your combatant's death settings, dead enemies (i.e. any non-player group combatant) can be removed from battle on their death, so death might never check out in that case.
    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!
  • Okay I had tried the Ally target but it didn't work, so I changed it to all hoping it would find something. I'll check the death settings.

    And @Dre788 I'll have a look at that approach as well.

    I might just write my own battle AI node for this specific use case.

    Thanks for your help.
Sign In or Register to comment.