I’m looking for a clean and easy method(s) for informing AI chars of player state. For example, I want enemy AI to lose sight of the player when I activate adaptive camouflage (a la Predator cloak, think Crysis). I know I can toggle a boolean variable on my player, but how do I transmit that info to the AI so that they know to stop seeing my player, i.e they pretend he’s not there.
I thought of some methods, but they seem to be too complicated than what I’m looking for.
For instance, I can create a game rule that informs all NPCs that the player is cloaked and they lose sight.
Another idea was to make individual AI check if player’s “cloaked” boolean is checked, but that would have to be checked every frame(and I fear it’s expensive)
Please if anyone has any method they like to share, I would greatly appreciate it.
P.S. I wonder if there’s something packaged with UE4. I know UDK had a boolean “isPlayerVisible”(?) or something like that.