I want to make a battle where my battle group size is 3, but where the enemy only attacks one target and if this target dies, does nothing, i used object variables check, but my enemy sometimes attacks other combatants that don't match the requirements..
  • Can you give me more details on your check (and how the variables are set)?

    Generally, make sure to Clear the found targets in that check node to remove any previously found targets. Also, use a None action node to prevent the combatant from using the base attack in case no other action was used - this will most likely use a random target.
    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 check the variable at the start of the AI but i use the check and not clear, maybe it's the problem, my variables are set to my combatants since they are object variables , my AI is like this : CheckObjectVariables/Success/Random/Ability1orAbility2 and if fail i use the None Action, so maybe it's the clear that causes problem thanks a lot :)
  • Well, if it's at the start of the AI, it shouldn't really matter unless you have other battle AIs running before it (i.e. multiple battle AIs on the combatant).
    I'd also recommend connecting the next slot of the other abilities to the None action, to do nothing if they fail.

    Oh, and also enable Force Found Targets in the ability nodes :)
    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 2018
    I tried and it changes nothing, my enemy sometimes just does nothing at all all the battle long and if i use check he attacks all my party ..

    EDIT: Okay fixed it by using Conditions instead of Variable maybe it's a bug or maybe it's how it works but in he meantime it works for me thanks alot :)
    Post edited by Tr1nome on
  • Okay EDIT again : Now it restarts to bug and attack others and each time i open ORK Framework it asks me to save the BattleAI Tab..
  • Could you post the details on your object variable's setup (e.g. which variable type and value each combatant has) and how you're checking the variables?
    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 have only one combatant that has an object variable component automatically attached when the game starts, the variable key is "player", it's a bool, so the value is true, when i check the variable in the AI i check this value and if success i use the abilities with force found targets enabled and i fail i use the none action
  • But if you only have 1 combatant, there's only one target for the enemy to attack anyway?
    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!
  • Nah I mean I have only one combatant that contains this object variable ^^
  • Hm, tested this and worked fine here. The enemy only attacked the combatant with the object variable - in case the enemy wasn't able to use the ability, it did nothing (as set up).

    I can further look into this if you post screenshots of your settings or send me a small Unity test project with your setup to contact@orkframework.com :)
    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.