I'm having a problem with enemy AI where, if there is more than one enemy, they will not move to the player they'll just attack randomly with rotations and a few steps almost randomly between the attacks and sometimes almost appear to be attacking eachother (I'm not totally sure because they don't stick to their target well if that's what they're doing.) But if there is only one enemy their AI works just fine and they close the distance with the player and attack them with a random series of attacks once within range. I've gone through the Move AI settings but am not sure what the problem is.
  • Hm, hard to tell without knowing your setup.

    My first guess would be that the combatants are part of the same group and one follows the group leader?
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I thought about that and turned off group leader but they're still doing it. Toggling it on and off it does make a difference. They seem to prioritize attacking a center point between the lot of them when it's on, and just sort of take meandering steps between attacks while it's off.

    Okay, on second examination I may have set up their AI's and stuff wrong on a deeper level then I thought. I disabled the nodes in their battle AI that randomly select for them to make heavy or light attacks and they're still doing it.
  • Is the ability they're using targeting a single combatant or a group?
    Targeting a group might be why the combatant is targeting the center.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Actually the abilities have Target Type: Enemy, Target Range: None. They were set up that way so that they could be used without targets or to target general areas.
  • Hm, an action without a target has nothing to move into range for.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • But it still does move into range before attacking when the player character is the only target.
  • Since this is a pretty specific setup, it'd be best if you could send me a small Unity test project.
    If that's not possible, I'd need more details on all related settings (move AI, the used ability, battle system, etc.) :)
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Yeah. I guessed that might end up being the case. :)
    I'll get to work on sending that.
  • Should I send that to contact@orkframework.com?
  • Yes, please :)
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • As you can see my AI setup is extremely basic. I had it setup to check the distance to the target and use an ability if the target was more then a certain distance away. The ability was "Move to Target" whose event moved the user to the target. That was mostly just for testing purposes because I didn't have move AI's set up yet. I tried to piece together and re-purpose what I could from the "combatant spawners and move AIs" tutorial but being in combat seemed to mess with things a lot. My combat setup is pretty unusual.
  • I'll check it out in the next days, already downloaded it :)
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Awesome! Thank you!
  • I've fixed most of the problem. Under the combatants AI Settings I had 'Auto Target' and 'Nearest Target' on. When they're off they stop attacking eachother and hunt down players as their enemies. They still won't finish moving before using abilities though. Currently they don't seem to be acting according to the battle AI's right now because they're currently using abilities they're battle AI doesn't tell them to use. They randomly use the various abilities their combatant knows.

    I have a different problem that is related in that it is also about controlling combat units correctly although it's not exactly the same. I've added ally's that you can get in your party who will follow you around and join in battles. I basically just did things the way you have them in the Game tutorial for adding a party member. Then I changed it slightly to make the Ally player controlled on their turn. It mostly works except all my keybindings for my attacks and abilities don't seem to work when I'm controlling them (they still work when I'm controlling the main player character). The combatant was just a copy of my player combatant. I had them join the player group and faction rather than the ally faction.
  • If by keybindings you mean the control maps, make sure that:
    - the combatant has the control maps added
    - in your battle system's setup (except for real time), enable Selecting Control Map
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.