Be the first to post for 'Blueprint Behaviour Tree Tasks'!

If you’re reading this, there probably aren’t very many posts yet. But don’t worry, you can be the first! Either create a new post or just reply to this one to say ‘hi’.

This lecture was a lil bit hard to take in. I’ll prolly have to rewatch a few times to really understand it, but I get the gist of what you did @ben.

My question is why does Index have to be exposed publically here? As we have it right now all Move To needs is just the NextWayPoint correct?

And since CycleWaypointIndex is inside ChooseNextWaypoint, there’s no need to expose Index unless I’m missing something here…

Hi Gemini, you had me going there. I thought I had made a mistake, and even edited the video to reflect it. However, on closer inspection this index does need to be public, as we want to store all the AI’s state in the Blackboard data and this index is part of the state. We could arguably store only the index, but this way is simpler for now.

If you make it private the only reason it keeps working is Unreal is caching the association with the blackboard key, and still writing to it.

Does that make sense?

Hey @ben it makes more sense now that you explained it like that. The two variables that we made inside the Blackboard, we want to apply the values of Index and NextWayPoint to those two variables and that’s only possible by making them public.

I really appreciate the clarification! :smile:

You’re welcome, thanks for asking! I even edited the video, uploaded it, then thought about it and reversed!