The Turret.
VIDEO
The Turret works with a little script with 2 functions in it. These functions are called by "atdm:target_callscriptfunction"s (the yellow cubes in the picture) and are triggered by "trigger_timer"s (the purple cubes in the picture). "trigger_timer"s can be triggered on and of by other triggers.
In the spoiler I put the script, with, i hope, as many information you need to understand a bit what is going on, so you can adjust it to your needs. You can use the script as is and give your own entities the same names as the entities in the script. (Script is also in the Turret.pk4)
In the Turret.pk4 is the mission folder with in it the map folder and the sound folder. In the map folder is the Turret.map file and the Turret.script file. They both have to have the same name otherwise the script won't load, and won't work. In the sound folder is the soundshader Turret.sndshd that is needed for the custom explosion sound I made (from a thundersound that is already in the game) to be loaded. A soundshader file is actually very simple to make, and adding custom sounds to your map is therefor very easy. The audiofile is in the sfx folder, that's also in the sound folder.
Questions? Ask them.
Have fun : )
Turret.pk4