Space Engineers

Space Engineers

602 ratings
Rdavs Easy Auto Turret Script
4
3
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
745.853 KB
15 Aug, 2019 @ 6:15am
15 Aug, 2019 @ 7:29am
2 Change Notes ( view )

Subscribe to download
Rdavs Easy Auto Turret Script

Description
This script automates and provides effective tracking and weapons firing to player made rotor turrets.
With a self-searching automatic setup that means all rotor turrets are found automatically with no renaming or grouping needed.




About The Script

Easy Auto Turret is a script designed to replace and vastly improve on my previous turret scripts, with an exceptionally rapid survival friendly installation taking less than 15 seconds (check the gif!) along with a powerful and effective tracking algorithm to suit point defence, flak and heavy batteries, this script combines effectiveness with user friendliness.
This script is for the every-man out there that wants to mess around and experiment with rotor turrets to add some spice and variety to vanilla combat without spending hours setting things up.

Feature Set:

~ Easily installed system with integrated instructions and useful diagnostics,
~ Exceptionally performance friendly script
~ Self Searching algorithm automatically finds rotor turrets without any naming or grouping required!
~ Multi armed turrets supported
~ Returns to intermediate resting position after finished targeting
~ Easy customisation of various options such as projectile velocity, and turn rate of turrets
~ Survival ready and friendly, with built in diagnostics
~ Resistant to damage and will not break if parts of a turret are destroyed in combat
~ Uses every vanilla turret it can on the ship for spotting targets, even if one or more are destroyed





Installation Of The Script Into The Programmable Block (PB)

To install a workshop script do the following (there is an image below that shows these steps)
- Open the pb's terminal
- Press 'Edit'
- Press 'Browse Scripts'
- Find This script and click OK
- Click OK again

The scripts runtime indicator ( a small moving indicator) will now be seen along with the version number and a few other bits of useful information.
the PB is now set up and will give further instructions if you are missing any key blocks.




Basic Installation Of The Script

To set up the the script the code will help you as best it can, and will tell you if you have any blocks missing.
However every grid needs:

~ 1 or more vanilla turrets for spotting targets
~ 1 or more control blocks/ cockpit/flight seat/ remote control etc
~ The programmable block with the code installed
~ 1 or more rotor turrets with the elevation rotor facing right (refer pictures/gifs)

Upon recompilation the program will automatically find, detect and set up all the rotor turrets it can find!
Once a target comes into range of any of the turrets on the grid the script will try and guide all turrets towards that location and fire at it converging on the target.




In Addition To Remember:

~ If the turret elevation rotor is built in a way where you want it facing left add #LEFT# to the elevation rotors name
~ If you want multi armed turrets build your turret and add #LEFT# to the turrets left arm elevation rotor
~ A turret when it cannot aim correctly at the target will sort of wiggle, this indicates incorrect setup
~ If you are using mods or primarily missile based weapons you can change the projectile velocity in the custom data options to improve the turrets tracking


Bonus Features:

~ In the scripts custom data there is not only installation instructions but also some options which can be edited to tune the script to your pleasing
in here are things such as changing the projectile velocity, options for only using named blocks

~ If you set the upper/lower limits for the turrets rotors, the turret will return to the middle intermediate position after they have finished firing.

~ Multi armed turrets (ie 2 rotors) can be set up by calling the left arms elevation rotor (or including in the name) #LEFT# the same goes for turrets where you intentionally want their single rotor arm facing left.

~ If a turret is destroyed in action it will be logged by the script as a 'disabled turret', the script will try and continue aiming and firing with all remaining turrets
and thus the script will try to continue fighting to the bitter last.
Same goes for seeker turrets.

*I intentionally didn't create a sea of features to make setting up more straightforwards and was also easier to keep performance friendly,
if you're looking out for some more advanced tuning and features than what's in this script, check out Whiplashes slaving script, I can vouch for the quality of his work :
Whips Turret Slaver



Thanks And Acknowledgements

Many thanks to my beta-testing team and discord who gave continuous support and testing along the way, if you'd like to be a part of the discussion you can join in at: https://discord.gg/MXz8Gkj


Bugs and Issues

Please get in touch with me (via the discord is best) with any bugs and issues you have with the script, I've put aside some time over the next few days for any emergency bugfixes and tweaks so the code works well, this one has been a in development for sometime now so had been tested quite thoroughly but stuff might still exist, if you do encounter anything, let me know!

Popular Discussions View All (2)
30
29 Nov, 2021 @ 5:28am
PINNED: BUG REPORTS
Rdav
1
5 Dec, 2021 @ 1:28pm
Two arms turret aim is off
FrAgGeR
311 Comments
BooseOG 16 Oct, 2024 @ 3:03pm 
Also how does it reload?
BooseOG 15 Oct, 2024 @ 5:06pm 
Does this control AI turrets aswell?
Cthulhu 16 Jun, 2023 @ 5:41am 
Rdav's are the best scripts from the beginning, thank you Rdav
ViccyQ 11 Feb, 2023 @ 5:59am 
@Rdav

Thank you for the update!
Rdav  [author] 11 Feb, 2023 @ 4:37am 
it will prevent it working
ViccyQ 9 Feb, 2023 @ 9:39pm 
Anyone know if Weapon Core prevents this from working?
唔姆唔姆怪 17 Apr, 2022 @ 8:43pm 
I don't know why it was used normally before. The script seems to be normal. The missile tower as the aiming reference attacks normally, but the rocket on the rotor won't launch and the rotor doesn't rotate. I don't know what the problem is
TurtleHunter2 24 Mar, 2022 @ 6:24pm 
Salutes to you, made a plugin so good it became an integral part of the community and they basically added the same thing to the game
Rdav  [author] 22 Feb, 2022 @ 1:03pm 
with difficulty, SE and long range are still somewhat opposed
Füchschen 19 Feb, 2022 @ 4:00pm 
This is just awesome. It even works with Railguns and hinges as mentiond below.
but here is a question:
How do i defend against long range "skill shot" railgun attacks from players?
The "detector turret" on vanilla only has a range of 800m.
How do i defend something like a real-scale Halo from attacks like this?
(ok, its not real-scale... but 232,2km /144miles circumference is pritty big, ok? ._.)
https://cdn.discordapp.com/attachments/621449708602130462/943956775009415168/unknown.png
https://cdn.discordapp.com/attachments/621449708602130462/943965716690919496/unknown.png