I’ve created a summon ability. However, I’d like the Battle AI to use the ability only when there are empty enemy battle spots. What’s a good way to achieve this?
Check the group size would usually be the best way. The Check Status node has various group conditions available.
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!
Well ... that depends on how your enemies are grouped, e.g. if they're all individual combatants, each in their own groups (e.g. not using a combatant group in the battle setup) or the individually summoned combatants are not joined to the summoner's group.
E.g. 3 individual combatants each have a group size of 1, while a combatant group of 3 combatants will have size 3.
In that case, you could use a Store Combatant Count node to store the count of combatants (e.g. In Battle yes, Is Enemy no would get all allied combatants in battle) into a float variable and do a variable check.
Post edited by gamingislove on
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!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
success- summmon
fail - other move
This is how im trying it but it currently still doesnt seem to be stopping the summons at 4
E.g. 3 individual combatants each have a group size of 1, while a combatant group of 3 combatants will have size 3.
In that case, you could use a Store Combatant Count node to store the count of combatants (e.g. In Battle yes, Is Enemy no would get all allied combatants in battle) into a float variable and do a variable check.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!