Hello,
A bizarre issue I can’t seem to figure out. I’m using a real-time battle system. When a battle starts the, starting schematic executes and everyone joins the battle, the enemies start attacking and the player can attack them, but the members of the active player group don’t attack, they don’t even appear to initiate the battle ai. They have the abilities learned, they’re actively in the battle but they don’t select any targets. Even when set to exactly the same as the enemy combatants (move ai, battle ai etc) they still won’t attack. The enemies will attack the group members as normal.

Anyone encountered this before?

Thanks in advance
  • Player group members are by default setup always player controlled for their battle actions, i.e. they await input from the player to select actions.
    You need to set the combatants to be AI controlled completely - e.g. in the general settings for all combatants, where you can find it in Battle Settings > Default AI Settings. Enable AI Controlled in the player combatants settings there, this'll have the combatants currently not controlled by the player directly use battle AI. If you enable AI Controlled Player, also the actual player is AI controlled.
    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!
  • Thank Gil, that fixed it
  • edited May 4
    I’m having a similar issue with AI starting battles that don’t involve the player. They run towards each other but combat doesn’t start, it looks like the battle prefab doen’t drop. Is the menu setting that allows the ai to initiate a battle when the player is not opposed to either faction?

    Still real time battles as per previous question.
    Post edited by cookereptiles on
  • Only Real Time Battle Areas allow fights between combatants without the player - any battle using the Battle component will only work with a player as part of the battle.
    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!
  • Thanks Gill, to clarify, I can’t get the AI to fight amongst themselves unless the player is involved unless the whole area is set to a real time battle? Can I set this at runtime, because currently the battles spawn as when combat begins?
  • Correct - without the player being involved, AI can only fight against each other in a real time battle area.
    There's also nothing to set at runtime, you'd need to set up a real time battle area in your scene (or e.g. on your enemy prefabs to have those around them).
    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!
  • Thanks, I’ll give that a try
Sign In or Register to comment.