Gun with AI

Hi everyone, #BlenderDude again!

Got a question about how to make basic gun AI…

I want to make a gun that stays on one place and can only turn his turret towards the enemies and shoot them.

Any help would be appreciated! Thanks, #BlenderDude.

what about just:

near sensor --> Edit Object (Track to Player)

radar/ray sensor + property shoot > 10 --> shoot + set property shoot = 0

property shoot < 10 --> property shoot add 1

Is there maybe a tutorial you can show me to, or can you just explain it a bit more in depth?

This should help = https://www.youtube.com/watch?v=Fa-UTYUwN48