I have created an AI that patrols, chases the player and I added the kill component onto it. It is based off of a vector calc that determines how far away I am, and when I am near enough, it will play the anim and kill me.
The issue is, the AI and it’s behaviour tree do EVERYTHING else fine, but when they see me, they approach/stand right in front of me and then nothing. The enemy mesh is bigger than mine, I am doing true first person camera and the AI just seems to lose sight of me as soon as its right in front of me.
Here are the blueprints for the controller.
Here are the errors I got for said blueprints while I was experimenting:
My AI plans an anim before it carries out the BT, so I put in a 3 sec delay for that anim and as soon as I did, the error finally started appearing above. Here are my blueprints for the controller directly:
Hi there,
Based on the error messages, you want to check if your blackboard is correctly assigned to you BT in the correct order. You may want to check the AI controllers shipped with the Action RPG template:
So I’ve done as you advised (added use blackboard, then run behavior tree) and still same issue. I added the print string before the branch and wrote (updatedaiperception) and it flashes up, and then of course the AI stops, I move and when the message comes out then it carries out the kill but I have to be stood right in front of it. I am wondering if the task finding my location is dodgy? Here is the code for that: BTS_IsCloseToPlayer posted by anonymous | blueprintUE | PasteBin For Unreal Engine I’ve been told that this could be why it stops, because its at my last location?
Hi there,
Thank you for sharing. Try to replace Vector distance by Get Distance to (using actor reference). Perhaps, as your enemies are taller, check if your player is within their vision cone angle.
Hey so I tried both and it still wasn’t working. On the behaviour tree for one of the sequences, the priority for aborting was both? I changed it to lower and it worked immediately. Leaving up for anyone else who is stuck