Behaviour tree quickstart guide problem

Greetings!

I tried to do the step by step Behaviour tree quickstart guide tutorial, but it doesn’t work. [link text][1] I repeated the whole process creating the blueprints, but it has the same error. Maybe I forget something vital that didn’t mention in the guide.
Thank you for your help in advance.

What’s the error your getting? The BT you’ve shown on your screenshot looks right and does what it’s expected to do. You’re missing a fallback note (like a BTTask_Wait) that will be executed when all other options fail, which is the case here. Both composite nodes fail to start because their run conditions are not met (both TargetToFollow and TargetLocation are not set).

Cheers,

–mieszko

Thank for the response Mieszko! The problem is that when I play the level the AI character just stands at the starting point. I’m mainly a 3D artist so I can easily misinterpret things in the programming part. So that’s why I prefer step by step tutorials. It’s a bit frustrating I can’t reproduce this lesson. The BT shows that the target location vector is invalid. I guess that vector is computed from the AgroCheck Blueprint. Details are here: link text

When I switch the Target location to “Set” the Behaviour Tree is “working” but the AI still doesn’t do anything.

It isn’t really clear in the tutorial but in the AgroCheck service page, where it says

DesiredObjectTypes EObjectTypeQuery array one entry set to Pawn

what it means is that you need to set the default value in the AgroCheck Defaults tab. Click + beside Desired Object Types and set the value to Pawn

Thank you Warmak!
I checked my settings but it was already had the Pawn entry. So I had the same result but thanks again.

I have the exact problem. The trace to the player pawn works but it is never set as Target to follow for some reason. I

You need to do some blueprint debugging on your own, sorry. It will come in handy in future anyway :slight_smile: The underlying code works until proven otherwise :wink:

Hello Warmak, I had the same Problem, but after setting this pawn-setting as you proposed, the AI is simply going to my start-position and then returning to its homelocation. Beside That, the Behavior Tree is still showing the Error (s.o. “Value None”) and now I got another key named “SelfActor” out of nowhere. Do you have an Idea on how to fix that?


I was having the same issue a few moments ago, have you checked the “Radius” value that is on the “MultiSphere Trace for Objects” function that is implemented in step 9? I had it set to 0, when it is meant to be at 1500.

I had this same issue. Make sure in ArgoCheck you have Trace Channel set to Camera in Line Trace by Channel. The default is Visibility. You can see it here. Hope that helps. I also had to make my character go right up to the AI before they saw me and chased me. Just need some minor tweeking.

Blueprint docs

absolutely the same problem. Rewriting the script 3 times, but still the same as described herein.

Pardon me for reviving this, but I am debugging this problem and here’s what I found out:

1] In AgroCheck, if you disconnect ‘As Follower AICON’ of ‘Cast To Follower_AI_CON’ and the Set ‘AI CON Ref’ node, the dummy tracks you the first time with truck loads of the following error:

‘Error Accessed None ‘AI CON Ref’ from node Set AI CON Ref in blueprint AgroCheck’ and then
‘Error Accessed None ‘CallFunc_K2_GetPawn_ReturnValue’ from node Set AI CON Ref in blueprint AgroCheck’

recursively, for as long as the ticks are ticking. Afterwards the dummy just stands there.

Here’s a screenshot:

2] In AgroCheck, you’ll find that AI CON REF is being checked to be not equal to near the Event Receive Tick. But what is it being checked with? Nothing. See the ‘Select Asset’ entry in the tutorial? Now here’s the weird part. If you do not disconnect the nodes marked in the screenshot, but instead select ‘AI Character’ blueprint in place of ‘Select Asset’, the dummy chases you for the first time and then it stands there.

3] In both cases though, HomeLocation and TargetLocation are shown to be invalid in the Blackboard.

P.S. Engine version 4.7.6, Top Down Blueprint with starter content included.

So can anyone shed further light on this?

EDIT: I suppose those are just hacks, ugly as hell too. What did make it work ultimately was to change the radius of Multi Sphere Tracer to 5000/10000. Also, decrease ‘wait time’ to 1.0s and ‘Acceptable Distance’ to something manageable like 10 or 5. In that the dummy seeks out the cubes and not the player. So hide your player character behind some random cube and watch the dummy hug it. :slight_smile: Also Dave, the camera/visibility issue should not affect this much. This is how it worked with Visibility. I did not have to set it to camera. I am guessing it is suited to the player character’s camera. Or the AI character’s camera if it has one.

I am going to try and refine this further in addition to making sense of what is happening here. I’ll be glad to help people who are stuck in Behaviour Tree tutorial and have absolutely no idea how to proceed. :slight_smile:

In general the problem was solved ! I was created Terrain, and all the tests I spent on it, and on what did not work , and now decided to make a floor BSP Box’a and it worked .

At Argocheck

Check “Actor Class” on “Get All Actors of Class”, it should be “AI_character”. The default value is “AI_controller”.

After doing the tutorial in 4.8.2 I did come across a few problems as well which I managed to resolve. Possibly a workflow problem as I am new to UE4…

Apart from the other suggestions which did prove useful in this thread I found that by removing the NotEqual(object) node at the beginning of the RapidMoveTo graph and reconnecting it by first dragging from the Get AI CON Ref node. The AI_Character then chased the TopDownCharacter as expected.

51345-ue4helperpic.png

One other thing I needed to do was change the Collision Presets of the obstacles in my level. All I needed to do there was change the Camera option in Trace Responses from ignore to block. This was so the AI_Character would not see the TopDownCharacter through the obstacles and would return to its HomeLocation.

51347-ue4helperpic1.png

Hope this helps someone.

Replace Event Receive Tick node in AgroCheck with Event Receive Tick AI

This tip about Actor Class AND the Multi Sphere Tracer Radius to 5000 had worked for me. Thanks!

How to set TargetToFollow and TargetLocation?

Thanks Warmak! Your comment fixed my issue and when I went back and looked at the tutorial I can see that it does in fact have that information but it’s not as spelled out as it could be. Always balancing reading thoroughly with consuming as much as possible. Cheers!