Just to recap if I understand the idea correctly...
Suppose I have an action that will decide what building to build next.
In that action, I will loop over all available buildings I can build and calculate the utility for each of them. The action will return the highest utility amongst those...
Ok thanks. I looked at that before but never got into it.
I mainly was confused with the priority vs utility selector. From a pure technical perspective, the utility chesk every tick for the utility and aborts accordingly while the priority is more static and let the task run and only rechecks...
I'm building a 4x space game and I'm using behavior designer for my AI.
My individual units use their own BT which is fine and I can easily develop them.
I am now in the process of looking into building an overall AI that dictates the behavior of the AI player in general.
For example, I'm...
One more question around this.
Can I somehow restrict Is Under Attack to be evaluated less times? At the moment it is running every tick but I want a lower frequency. Once every second for example.
Ok great. that seemed to do the trick.
Needs a bit getting used to.
I was trying to make it work so the Flee action is aborted when the ship is no longer under attack. I needed to set my sequence abort to Both.
I was trying to over complicate it with parallel and interrupts.
Here's how it...
I am building a BT for a space ship. It's main purpose is to find a planet, look at what the planet has to offer and trade. Go to another planet and sell.
That part of the BT works fine.
I now want to add a behavior so if someone attacks the ship, it starts to run away from the attacker. I...
Yes it's called.
I noticed it acts weird like this because I didn't initialize status in the beginning. I had:
private TaskStatus status;
which was causing the havoc. When I replaced it with
private TaskStatus status = TaskStatus.running;
It was better.
I have an action that applies forces to rigidbodies so I guess I need to apply that in the OnFixedUpdate instead of the OnUpdate.
Following code doesn't give me my expected behavior:
public override void OnFixedUpdate()
{
bool done = UpdateAction();
if (done)...