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.It looks like you're new here. If you want to get involved, click one of these buttons!
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!
First things first: I'm trying to use as much as ORK's features as I can and trying to integrate my own scripts in the ORK workflow. So, for example, when I need specific behaviours I can control with the event system instead of creating my own behaviour I create new nodes and use those. I'm not sure if this is recommended, but like I said I'd like to preserve as much as ORK's workflow as I possibly can when adding my own stuff. On to move AIs and battle AIs.
Like I said in the first post my battle system is similar to the one in FFXII. It's basically an active time menu driven system, but characters can move around and act when in a certain range. I could set this up in minutes thanks to ORK and got it to work quite smoothly. Now I'm trying to extend this behaviour further than basic action choosing and would like for enemies (or npcs) to have specific behaviours that I can't really seem to get right with my (very limited) knowledge of ORK.
The way I understand it is that Battle AIs are run during the enemy's turn, while Move AIs are run constantly (unless I do something about it with the event system). Here's an example of behaviour I would like to obtain:
[choose next action]
if (next action == melee)
{
// hunt
}
else if (next action == ranged)
{
// caution
}
else if (next action == heal)
{
// flee
}
The only way I could think about to do this would be to create an ability to set each movement mode through the event system and select it in the battle AI based on the chosen behaviour.
Also, I would like to modify some of the move AI behaviours, especially the hunt mode.
var minimumHuntRange = 5;
var actionRange = 3;
if (player distance > minimumHuntRange)
{
hunt and get into actionRange
}
else if (player distance < minimumHuntRange && player distance > actionRange)
{
wait for turn
enter range
act
}
else
{
wait for turn
act
}
In other words, I'd like the enemy to hunt the player until it's in the action range, but to start hunting only if the player gets outside a wider, minimum hunting range. Or, to simplify it even further, I'd like the enemy to wait a bit before starting to hunt the player.
More generally you could say that what I would really like to understand is a way to connect Battle AI decisions with Move AI modes and if there is any way to extend or even add Move AI modes.
Thanks for your help and sorry for the chaotic explanation
An alternative would be using AI behaviours/rulesets (i.e. the slotable AI feature) to change between move AI modes.
There's currently no wait time between mode changes (e.g. starting to hunt), you'd have to add that in the MoveAIComponent script in ORK's source code.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!