AI sensing and reacting to objects in world (not player)

Working on AI for a stealth top down / third person prototype. AI’s patrolling waypoints and when aquires player, gives chase. What I’m trying to do is add in control panels. Firstly for suspicous guards to sound an alarm (i.e. once aquired, gives chase, looses player, moves to panel to sound alarm bringing more guards). Any thoughts on that welcome, just starting to implement that.

But the important question then is this: I want to be able to hack or affect the panel. For example - go up to the panel and manually hack it, leaving no trace that I’ve done so. So when the guard patrols past it, sees nothing interesting, and moves on. But when they move to trigger it, it wont work. Alternatively, I could shoot it, disabling the functionality, but leaving a trace, so if a guard sees the disturbed panel, moves to an alert state, or finds the next closest panel, whatever. But is moved to action of some sort. So the question is - how can I signal to the guard that the panel that’s come into their view is damaged such that they can take action? Same question could be applied to a downed guard… Player shoots guard 1, guard 2 finds body, moves to alert state, or to a panel or whatever. The sequencing of behaviour seems easy to me to comprehend within a behaviour tree, but perhaps a service needs to be run, every tick maybe, updating an enum perhaps. Perhaps a bool (brokenPanelSeen, set to false), that triggers true when an actor / object is in their FOV… But how to signal that the panel is in condition 1 (evidently tampered with) or condition 2 (no outward appearance of tampering)

Any thoughts greatly appreciated.

There are a few ways to go about this. You could try the new EQS (Environment Query System). I think it would be quite suited for such a task (haven’t tested it yet).

You can also use PawnSensing component. Just uncheck “Only sense Players”. That way the AI can see every pawn. Then implement a “OnSeePawn” event in your Controller and do a cast to the appropriate class. That way you can implement different behaviour based on what type of pawn (player, terminal, dead body, etc.) the AI sees. Each type of pawn can then implement various functions which can be called, e.g. “IsDead”, “IsBroken” which give you information about the current state.