Download

Behaviour tree not aborting on BB value change

For some reason my behaviour tree is getting stuck on a route and won’t abort when a bool changes even though the decorator is set to abort both.

I have a service setup that will check the distance between the enemy and the player and set a bool value to true when the player is in attack range.

While the player is out of range, the enemy will move to the player location within a specified radius.

Once in attack range the enemy should then follow the next route which attacks after a delay.

Can anyone see why this would always get stuck on the left route?

Make sure you have the abort function overriden in you btt tasks. Should be something like OnRecieveAbort. And connect it to finish execute. Otherwise some tasks can get stuck.