puksometron
Member
Hi,
I am trying to get my bots to flee, rather than engage in combat, but I am struggling to get this to work properly. I'm using the Deathmatch AI team behaviour tree. The first thing I have done is increase the flee probability to 90%, that seems to not be doing anything. Also, I noticed that the flee tasks require the possible target GameObject to not be null, but the reset task within the Damaged sub-tree kept resetting it, so the bot is unable to flee. Disconnecting the Reset task still doesn't do anything, the bots are still not fleeing. I have also increased the minimum health to 100 and lowered the minimum distance to 5, but this doesn't seem to be doing anything. Here is the sub-tree:
I'm not understanding why the Reset task was placed after the Has Taken Damage condition, because the possible target GameObject is getting assigned there, and then the value is reset afterwards, so it becomes null for the Should Flee condition. But even if I get rid of it like I did above, the bots still don't want to flee. Is there something I missing here, or maybe I'm not fully understanding the behaviour tree? Any suggestions would be greatly appreciated
I am trying to get my bots to flee, rather than engage in combat, but I am struggling to get this to work properly. I'm using the Deathmatch AI team behaviour tree. The first thing I have done is increase the flee probability to 90%, that seems to not be doing anything. Also, I noticed that the flee tasks require the possible target GameObject to not be null, but the reset task within the Damaged sub-tree kept resetting it, so the bot is unable to flee. Disconnecting the Reset task still doesn't do anything, the bots are still not fleeing. I have also increased the minimum health to 100 and lowered the minimum distance to 5, but this doesn't seem to be doing anything. Here is the sub-tree:
I'm not understanding why the Reset task was placed after the Has Taken Damage condition, because the possible target GameObject is getting assigned there, and then the value is reset afterwards, so it becomes null for the Should Flee condition. But even if I get rid of it like I did above, the bots still don't want to flee. Is there something I missing here, or maybe I'm not fully understanding the behaviour tree? Any suggestions would be greatly appreciated