So I wrote some AI for my NPC. He inherits the Character class and obviously has his own blueprint with a CapsuleComponent. I wrote all his AI in his event graph, however I noticed there is AIController and behavour trees? If you write AI for an npc, is it supposed to be in an AIController Blueprint? or is writing the AI in the Character blueprint for an npc satisfactory?
It should be fine as long as it works and it doesnt have any complicated intelligence which you’d want to improve over time.
is exactly what i have been wondering as well. I spent some time weekend trying to get my AI setup using the ‘AIController’ with a ‘Pawn’ class and ‘Behavior Trees’. I could not get my AI to move to my players position in the ‘AIController’ or the ‘Pawn’ class for my AI by trying to use the ‘AI moveTO’ nodes, but in the end i just set up my AI using one character blueprint and a ‘Simple move to actor’ node sorted the follow player issue.
I would also like to know if is ok to do? Can i still setup ‘Behavior Trees’ in the future with my CharacterBP AI?
I am sorry i was not much help, but i would also like to know the answer to question.
Thanks.
I think if you do basic AI (randomly walking around or moving towards the player) as mentioned above is ok, but I think if you ever make some Bosses in your game that have a bunch of different decisions then thats when you want to use Behavour trees and AI Controllers but don’t hold me to it Im still learning.
Behavior Trees are for decision making essentially. AI can be done purely through the NPC’s Blueprint or a combination of both. Usually you do not program much in the AIController Blueprint, it just holds a lot of data basically.
If you want a basic run-down on using a Behavior Tree to drive an AI, here’s a tutorial: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums
Let me know if helps.
Thanks for clearing it up a bit.