I used Matt Aspland’s tutorial for AI Animal Movement (Setting Up The Basic Movement | Part 1 Of Creating An Animal AI In Unreal Engine 4 - YouTube), and my character only stays in place with the idle animation. I debugged by setting the default value from “0” to “150”, and the animal walks in place (without actually changing its location). There’s a gap in my knowledge that is preventing me from fixing this. Here are the relevant blueprints:
First off, I’m a fan of yours, so deal with it.
Secondly, I’m going to go heat up my homemade Tikka Masala, Orange Tea, and once the rage is completely out of me, start all over from scratch with your recommended video.
So, I think there’s a step missing that the tutorial(s) assumes we should know on our own, but I’m new, so enlighten me:
Should there be instructions/code in the AIControlled character 's EVENT GRAPH? Because I’ve followed the tutorial to a T, and upon compilation, it stays in idle mode.
BUT
When I apply the code (seen below) to “Move to Actor/Location”, upon compilation the deer moves.
Hi there,
You’re moving forward.
Yes, the AI controller can hold code to initialize the Behavior tree in a certain order, assuming that your behavior tree is completed with all branches triggered by appropriated conditions.
Have you examined the sample project yet? The behavior tree will receive notifications from the external events monitored by the AI controller (Enemy on sight, No Enemies, etc). It’s looks like your behavior tree is not completed yet. And a behavior tree follows a hierarchy from the top “Root” to the lower branches passing through the selectors and sequences.
This code you’ve shown is the very basic setup for moving AI. As you’ll see in the Epic’s training, the controller has a logic to monitor the presence of the player, and the “move to location” logic is written in the behavior tree.
“Yes, the AI controller can hold code to initialize the Behavior tree in a certain order,”
Indeed, but will the AI Controller execute automatically, without being called in the Deer’s personal EVENT GRAPH? (To reiterate, the tutorial leaves this section blank).
I’m at the 44 minute mark, and I’m doing this in my own project. Maybe he has some things already set up that I don’t? In which case, I should just keep following along? And eventually the deer will move? Because, with what I showed you, he’s got deer moving about.
Yes, the AI Controller must be assigned to the Deer Character BP, then it will work as a “brain”. You don’t really need to add code to your character BP. Most of the code can be stored between AI Controller and Behavior tree. You are in good hands, Wes is one of the best instructors, Imo. You should keep following his tutorial, as he is going to setup the left branch and the logic inside the AI controller.
Yes, I went through and it was very successful. Unfortunately he (Wes) seems to have only contributed to the Live this one time (for AI, at least). Very disappointing!