AI Detection/Sensing?

Hi everybody! I’m working on a top down shooter, using the basic mechanics from the “Conviction of Gun Dude” example. How should I go out to make a detection/perception/sensing system for my AI? For example, the AI wanders the map randomly, but if it sees something it doesn’t like, it goes into an “Alert” state and chases after whatever triggered it. Or, if it hears a noise, it moves toward the noise. If whatever it’s chasing is out of sight for so long, it goes back to wandering randomly. Thanks in advance!

you could use boids extension, it makes enemies not look so dead
or you can follow this AI tutorial made by gdevelop youtube channel:

have a nice day

Thanks! I did see that video, actually. It’s not exactly what I was looking for but I’m really glad GDev got Wesley to make videos for the engine. They’re the most helpful by far.