AI sight modification

So, my current situation is as follows:
i have the AI blueprint setup so that my enemy bots chase my character when they see him.

I also have my character blueprint setup so that upon pressing the “F” key, he cloaks, goes invisible much like the predator.

How can I modify the sight behavior of the AI bots to “wander off” when my character “goes invisible”, as if they are looking for him or can’t see him?

Having troubles finding the right documentation to help me with this. Been searching all day and haven’t come up with any results. Please help??

I guess you’re using PerceptionComponent on the AIController?
If so, you can pull off a reference of the Actor seen OnTargetPerceptionUpdate.
Create a boolean IsConcealed
Cast to the BP_Player and do a fork : If IsConcealed>>Wander // If not Pursue.

Then do a looping check OnTick, or better with a timer.

So if you want to the AI to wonder your gonna have to use the Navmesh found in the basic menu when your putting your level together after that you need into insure that call distance and navmesh are talking together if you need an example I have one for you.

i am using the pawn sensing component, to where the AI comes after my character on sight. I’ll be able to provide screenshots later if the blueprint setup, and even a link to the YouTube video showing/explaining what I’m trying to accomplish.

ok, so here’s the two blueprints. one is for the enemy AI charger, on see pawn…

the other is for the “cloak” effect for my third person character.

what i’m trying to accomplish, is when i press F and make my character cloak, how do i setup the AI blueprint so that the enemy charger character wanders off, as if they cant “see” me?

its about the best i can explain it, as well as providing pictures of the blueprints

Add a bool after the FlipFlop in 3rdPersonCharacter, set it to true when he’s cloaked.
In the ennemy BP add a fork, you already casted to Phi_Evolution(which I guess is your Player), just use that reference to check if he’s cloaked or not and act accordingly.

Then you’ll have to reccursively check if it’s still true or false. For testing you can just do it OnTick. But a more efficient way is to do it with a timer, something like every second or half a second.

Ok cool. I’ll definitely keep you updated on how it works out!!

Ok, here’s what i have set up, doesn’t work… kinda feeling like a moron right now, lol.

i know its not entirely right, and i understand what you’re saying, just cant get a handle on how to set it up exactly.

any chance a visual aid of sorts can be provided? I apologize for any frustrations with this, but thank you for all the help.

Thanks… Looks like I’ll figure it out on my own.


In the player:

In the AI:

thank you thank you thank you so much!!! it works for sure!!!