edited February 2 in ORK Support
Hello everybody,
I'm currently experimenting on a battle system similar to the one in Final Fantasy XII. I'm using Active Time battles, not blocking user controls (so the player can run around while fighting) and the actions are menu-driven (so I select attack, select a target and act). I'd like to create an enemy that behaves in the following way:
if (time bar < N) {
try to keep a fixed distance from player
}
else if (time bar > N and time bar < M) {
run to attack range and move around the player while keeping minimum attack distance
}
else {
attack
}
Is there a way to do this? I looked into AI behaviours and AI rules but I'm not sure how these are handled.

I'm using Move AIs to move around with NavMeshAgent and a custom controller script. Thanks for your help
Post edited by azazello on
  • I'd recommend using the Caution mode in the move AI for that. The Stop Range of the caution settings allows you to define the distance to the player the enemy will keep, in combination with Use Action Range setting here, this should be what you're looking for.
    If you're enjoying my products, free updates and support, please consider supporting me on patreon.com!
  • Thank you! This solved the issue at hand. However, for a more general purpose, is there a way to "directly" control a specific combatant's move AI behaviour during a battle (but before its turn)? For example, to change the behaviour in different conditions (low HP, status effect, timebar fill...)?
  • You can change the move AI and move AI mode of a combatant using the event system.
    If you're enjoying my products, free updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.