How do I make an AI Move and Shoot using BT?

Let me start by saying that UE4 is awesome and Im really enjoying learning the BT system.

As the title says Im trying to get an AI to move and shoot. In this case I am just learning the BT system and I have a simple sphere (pawn) which Ive set up to shoot a projectile.

Until now I had it set to MoveTo the players location if they got out of range. Then continue shooting (a selector).

Now Ive changed it to a custom move task using the Move To Location or Actor node.

Heres the issue. My AI can only move or shoot. But it cant move and shoot.

So I tried to use the simple parallel composite, as seen here,

However, the second child never goes off and I have no idea why.

Just for clarity, heres the insides of movetoactor

and shoot,

Any advice would be appreciated.

As soon as your MoveToActor task gets called it’s calling MoveToLocationOrActor, which is fine, but you configure that call as LockAILogic == true, which means BT will get paused until the movement finishes. Uncheck that flag and give it another spin.

Out if interest, why aren’t you using the BTTask_MoveTo?



Thanks, silly me.

When i tried to use moveto, and input an actor instead of a vector, it didnt work.

Id heard it would but maybe I didnt something wrong.

Actually, after some testing, I found that didnt actually work.

I mean it did, but only because the “shoot” part of the BT is running. But the actual second child of simple parallel still isnt doing anything.

How do you get simple parallel to work??