Is it possible to keep a target in Battle AI based on the lowest/highest status value? (for example, lowest Hp, or lowest def)
I tried to accomplish this by using select combatant and formulas but that doesn't seem to be working. I'm not sure if the formula is recognizing the found target as a combatant.
  • Depends on what you define as keeping the target.
    Generally, if the target was added to the found targets, it'll be in there until it's cleared or the battle AI of the combatant ends (all battle AIs finished executing or an action was found).

    Using Store Targets and Load Targets nodes you can store and load found targets to reuse them in later runs of the battle AI.
    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 not sure where I'm running into a problem. I believe the target I'm getting is not being recognized as a combatant. This is what I have set up.

    https://imgur.com/a/6Ra2jds

    Ideally, the unity console should return the combatant's name. Is this set up correctly?
  • No - your Select Combatant is currently selecting all enemies of the battle AI's user. I don't think this can currently be limited to found targets.
    I'll look into it.
    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 September 2022
    Edit: Disregard this post, you can just use the node Get Status Value to do this in one step. :)

    I managed to figure out a solution for getting the highest/lowest status value in Battle AI. For anyone interested this is what I did.
    -Make an ability that doesn't use a turn, have it target self
    -Use a schematic for target
    -In the schematic set all your potential party members as Actors under:
    --Player Group
    --Current
    --Use Member checked
    --Only Battle Group checked
    -Compare each member's status value with each other seeking the lowest/highest value
    -Once you find it, store it in a dedicated global int
    -Goto your Battle AI of your enemy and use the newly created ability as the first action Ability
    -Followed by the node Check Status
    -Set Found Target to "Keep" and Target to "Enemy"
    -Set the status value you used in the ability and compare it to your global int
    -Your enemy should now only "keep" the target with the lowest/highest status value every time it uses the AI
    This is working well for me.
    Post edited by Dre788 on
  • There's actually been an update in ORK 3.6, listed in the changes :)

    The battle AI's selected data nodes now have a Found Targets user.
    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!
  • @gamingislove
    OH, I thought I properly read through the entire update list. Not only is Found Target available in Selected Combatant but there is a node, Get Status Value, that keeps the target with the highest or lowest status value. This is fantastic and I feel silly for not noticing for this long. Thanks for adding these!!
  • You should try the search functionality in the node editor's context menu - e.g. simply searching for highest status already finds the Get Status Value node :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!
Sign In or Register to comment.