Download

Unreal 4 A.I Behavor Tree Tutorial Not Working (4.9.2)

Hello all :slight_smile:

Recently i have been trying to create A.I functions by using behavior trees, currently i have been using the unreal documentation tutorial and i have followed all the steps correctly and re checked over and over again but it still does not seem to work. I would really appreciate it if anyone could point out where i have gone wrong because so far i am getting this error message after playing the game and i in the behavior tree it is saying that target location is invalid and target to follow is none but should be the character.

I hope this makes sense and thank you for your time.

  • Adrain.S

2598c54bd506ad2e92976458bb80e77252c71e2f.png
02c85f4e87555bb9e9b711d0c36e8473cbad6229.png
4b6efaa5e0e6da5b2506f3444b3b00d53e8dfa39.png

Your problem is coming from the AI_follower class event graph I think, could you put a screenshot up of that bit, click the spyglass on the error message and it should take you to the problem node.

EDIT: autocorrect nightmare…

Hello and thank you for the reply, sorry about my long response i was struggling to find free time over the weekend, but here is the image anyway if you could still help me

No worries :slight_smile:

weird, it’s basically saying that when it tries to get the pawns location the pawn is returning none? Might be a timing issue as you’re calling it from begin play, to test if that’s the problem stick a delay node after the ‘begin play’ node and stick it to something like 0.2 and run it to see if you get the same error.

I’ll have to check how I’m calling an AI tree and blackboard on my project, I’ll have a look when I get home see if it’s any different to yours.

Thank you! :slight_smile: that did clear the error message, however i am still getting no respone from the behavior tree and the same error from the image above.

Instead of using a delay, you can bind an event right after begin play and call an event in another actor(instead of begin play) that receives the call with a reference of that actor. Of course you can unbind it right after the message has been sent. The child reference is sent from the child to the owner at begin play. Seems to work for me, but not sure if the correct way to do it. In short: Child > Get parent > as parent you get the owner > cast it to the BP > as the BP you will set the reference > After the parent receives the reference, it can use it right away >> Start A custom event(on begin play)

I hope it helps you figure out the solution to your issue.

Also the owner of the blackboard is an AIController which posesses the pawn I believe.



42b312dbae182488fcafab4754f1091a3c08e797.png