About [Archive] Rdav's Turret-Tracking-Script
From Steam WorkshopHi There! NOTE: this version has been superseded by my EZ turret AI, and is held for archive purposes only, please see my workshop for the latest version! The arms race continues! This time with a…
Hi There!
NOTE: this version has been superseded by my EZ turret AI, and is held for archive purposes only, please see my workshop for the latest version!
The arms race continues! This time with a new script that will give AI to any player made turrets on your ship. 100% Vanilla, no mods required! The script will both automatically track, and shoot, any targets that are within range of a single Director turret located somewhere on your ship, coordinating every turret to fire at the same location, all this will be done completely autonomously; you don’t even need to pull the trigger manually. Like my previous scripts I have once again maintained my 'AK47' principals and tried to make a script that is: easy to use, cheap to build, and quick to set up even for people with no programming experience, (less than 2 minutes setup time), but that that is also both fun and effective to use in both Single player and DS (yes I’ve tested it! provided sim speed is above 0.2 It works fine in DS!).
*****Example Blueprint For the Tutorial*****
**Remember to check out the bottom of the post for an advanced section with some useful diagrams and a troubleshooting guide**
Again big thanks to whiplash, xmuni, and some other scripters out there of whom without their work this would never have been accomplished. As always, any questions, potential improvements, bug reports or general questions I’ll be happy to answer in the comments below.
Latest News:
26/03/2016 [UPDATE RELEASED]
-Fixed issue where idle rotation would be out-of-sync in multiplayer causing the turret to shoot in random places.
As above, this was very annoyying in multiplayer battles,
========================================================================
Setting up the script takes about 1-2 minutes, here is a short guide on the basics, if anything is unclear let me know and I'll fix it! ------------------------------------------------------------
Step 1: Shipside Components Firstly place down a programmable block, a timer, and an interior turret (although any turret will work), rename the turret 'DIRECTOR'. Insert the script into the programmable block, and press, "remember and exit".
-------------------------------------------------------------
Step 2: Setting Up The Timer Loop To set up a timer loop that will trigger the script, get the timer block to: "run with default argument" the script, and then "trigger now" itself, (it's important to use 'trigger now' here!) Then start the timer. *(optional) after 'trigger now' add 'start timer' this will automatically restart the timer loop when you reload a world*

---------------------------------------------------------------
Step 3: Creating The Turrets Next thing is to create your turrets. Place down two rotors, (can use advanced-rotors too) to control azimuth and elevation of the turret. Then place a sensor block connected to the elevation rotor, pointing the way in which you want your turret to fire, check the video for the correct orientation. **both rotors should be of the same type!**

Rename the azimuth rotor; "AZ", and the elevation rotor; "EL", Then put all three components into a group in the terminal. (the sensor should be called 'Sensor' (only first letter caps)) The script will run through each group and find two rotors a sensor and any guns, and then coordinate them accordingly. The turret should now spark into life, pointing in the direction of the 'Director' turret, once it has settled you can add weaponry. I advise you get the turret running prior to adding weaponry and armor, although it’s not strictly necessary, this is because the script might decide a strange orientation is forward.
-------------------------------------------------------------
Step 4: Adding Weaponry Add as many weapons blocks as you want, and add them to the turret group. They will now be active, when the turret is pointing any direction apart from the default, and if the turret is close to pointing to the target it will automatically fire all the weapons in the turret group. Adding extra turrets is just as simple, just repeat the exact process you did to make the first turret, and create a new group. eg turret 1=*turret 1* and the second turret is: *turret 2*.
====================================================================== 
Setting Up Multiple Arms: The script will treat a new arm like a new turret, So simply create a new group, containing the new arms components. and the AZ rotor they both share.

-----------------------------------------------------------------
Setting Up Multiple Turrets: The script will automatically detect a new turret if it's in a new group, one programmable block will manage all the turrets, so all you need to do is create a new group for each turret.

-----------------------------------------------------------------
Adjusting The Script: Most useful changes in the script are simply changing names and changing numbers, both of which are done in this area of the script. Convergence will change at what average distance gun fire will converge to, I recommend you leave this at 800m: Rotational speed manages how slowly the guns will rotate, with 100 being AA gun fast, and 10 being Heavy turret speed.

-----------------------------------------------------------------
Using The Script To Direct Vanilla And Modded Turret Blocks
Highlights
From source dataFootprint
Rated a light load on a server.
Last update
Its author last shipped an update 10 yr ago.
[Archive] Rdav's Turret-Tracking-Script on Nxeon
From our catalogue- One-click install
- Not available. One-click install isn't available for this game's mods yet. Download it and upload it to your server in Files.
- Server load
- light
- Smallest plan we suggest
- Space Engineers — 8 GB (8 GB RAM). This follows our own load rating above, not a benchmark.
- Latest build
- 2016-09-22, released 2016-09-22
Game versions by loader
| Loader | Game versions | Newest |
|---|---|---|
| Workshop |
From 1 recorded build of [Archive] Rdav's Turret-Tracking-Script.
Run [Archive] Rdav's Turret-Tracking-Script on a Space Engineers server
Deploy a server above, then upload the file in Files.
What kind of mod it is
From the catalogTechnology & automation
Machines, power, logistics and automation.
Compatibility
- Game
- Space Engineers
Verified at the source
- ✓Steam WorkshopOfficial listing, checked 2026-11-01Open ↗
- ✓AuthorRdav, as published on Steam Workshop
- ✓LicenseNot published by the sourceFree
