Download

Making my first AI

EDIT: Read the second post, this was obsolete atm. Or atleast I guess. Thanks for your help :slight_smile:


Hello again. I just started with the AI and, after follow all tutorials here https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/ I still have problems to understand how the BehaviorTree works.

What I want to do is a simple enemy choose a random Pawn and follow him. And every x seconds (service Aggro_Check) he think to change his target. I managed to do it without a BehaviorTree but, ofc, I will need a BehaviorTree soon (to check range with players, attacks, etc etc).

Well, my problem isn’t really making he choose a target and follow him. My problem is understand how the BehaviorTree work really and know how to work with it in order to do what I want. I mean, if I find the way to do what I want knowing exactly what I wanted to do then it will be easier to understand futures BehaviorTrees.

This is my BehaviorTree that don’t work (ofc :3) .

bf9aa1a23adb72dbc190bd9c6a251010.png

What I am doing wrong?

BTW, I noticed that the animation isn’t showing up never, am I missing something?

Thanks so much!!


c211580829a32c8bdb1edd7ca0775af1.png
This is the behavior tree now. I musted do a task for the follow because “move to” was infinite until catch his target and I wanted that he decide change the objetive even in middle.

Well, the problem now is that the “play animation” only happen the first time, I guess I am missing something understanding the sequence node.

Btw, these are my codes, just in case that you can say me a tip or if I am doing something wrong:

2b069843fb6fd8bf1eeede59ed959faa.png

d05622d1aac012cbaa89f934d827b72a.png

Hello, after all this days I did this AI, I guess I am very close to do what I wanted:

7dc27fbd8fe468612429a936339a87fc6a4cc877.png

But can’t manage to understand why the “Taking a Player” that is highlight never end, even with a “finish execute”. I tryed it with a Succes ON and OFF, and changed the Sequence to Selector but without result.

So I am lost in this question.

Thanks :slight_smile:

EDITED. Added blueprints images. Just in case.

b2dbda16f509fcdbff770854af248206.png
d3fc9de6b8e9654dbc334e18776fd79bd14c34ea.png
d95cba0e21cdc7201ac1c982d5cb7cce.png
b7a9a59eb1ee8b7656e77f80a9af9ecf.png