Set when AI should start roaming

Hello @Mind-Brain and thanks again for your help!

This is the currently EenemyAI setup:


I think i forgot to say that if i dont use any box collision and just use the Event Begin Play, the AI works correctly and patrol around until he sees me. And, in that case, no error are shown. The errors begin when i try to setup the box collision to say the AI when appear and start patroling. In the Enemy AI i already have the run beahvior tree node. Should i put another one?

Thanks again for your help and your patience!

Okay! I think I have something!

So you should remove the RunBehaviorTree from the Get Moving event, and add an EventOnPossess node like I said up above. THEN YOU’LL ADD THIS:


This will let the BT/BB get SET, but then tell the logic to stop moving, so it won’t be doing anything BT related, but it’s still existent so the perception can still be updated, preventing your nulls.

Then we’re going to put THIS in the Get Moving (make sure to delete the Run Behavior Tree from here, that’s in On Possess now).
image
Plug that start logic node in with the brain component (just search for “get brain component” for both of these) and it’ll let the BT start running! Man I hope this is it because I have one more idea and it’s long and lame lol

Thanks once again for your patience @Mind-Brain
I am feeling so silly… i didn’t understand how should i set up your last tips…

I tryed this:

And this:

But i don’t get how this could be bounded to the SecondFloorAlert event dispatcher in the blueprint trigger box:

And i know that this is due to my lack of knowledge… In case we cannot resolve, i really need to say thanks to you for your kindness and patience! You are awesome in any case!!!

Don’t worry about it, @ElegantLooter !

So you almost got it! The problem there is that the GetMoving Event got disconnected from its Bind. That needs to stay connected to its Bind up in the BeginPlay :slight_smile: .

The first picture there was perfect, other than this part
image
still needs to be there. You are right, that is how it would get activated using the dispatcher!

So this is correct, you just need that little red connector going to “Bind Event to Second Floor Alert” On BeginPlay’s execution :smiley:
image

++

image

Hello @Mind-Brain i am really sorry to bother you again… i am getting confused :sweat_smile:

Should i set up in this way?

Because he wants something connected to the Bind Event to Second Floor Alert’s Target

Do we still need the Start Trigger variable?

Can you send me a diagram? Sorry if i bother you too much, i am trying to figure out myself how to solve this problem but i really cant :face_with_spiral_eyes:

Thank you in advance!

I just miss this :smiling_face_with_tear:

Hey @ElegantLooter! It’s ok. There was some confusion.

Your OnPossess Should look like this, exactly. Nothing else.
image

BeginPlay should look like this.

GetMoving should be connected as above! You want to get your start trigger pull off of that to get the bind event, then bind the event all on BeginPlay.

Leave your code for Getmoving as you have it here, with the StartLogic node, that looks good. :slight_smile:

Hello @Mind-Brain and thanks once again for your answer!

I found another way to achieve my objective, i will explain right now:

I placed my enemy outside the map, i created a path using blocking volume and placed a bp obstacle that prevent evenemy to reach his patrol path points. I set a box collision that make destroy actor when overlapped and placed that on the second floor. So now, when i reach that point the obstacle disappear and the enemy finally starts his patrol path. The player will never know what happened in the background ( Muahahahaha ). Thanks so much for the help you provided, i guess that your final comment is the solution i was searching. Thanks!

1 Like

Of course, @ElegantLooter! Anytime!

If you ever have any other questions, don’t be afraid to ask here on the forums! That’s what we’re here for, and I’ve had a great time helping you out with this. Be sure to come back soon if you hit any more roadblocks, but I’m proud of you for figuring out your own solution!

1 Like