Space Engineers

Space Engineers

Not enough ratings
Low Turret Ammo
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
5.857 KB
10 Aug, 2019 @ 6:41am
21 Sep, 2019 @ 7:07am
2 Change Notes ( view )

Subscribe to download
Low Turret Ammo

Description
Improved version of my ancient Turret Low Ammo script. (That was literal trash)
Never though I would comeback but I thought I might as well :D

This script is pretty straight forward it checks the amount of ammo in every turret by percentage.
Displays turrets percentage and name on any LCD with name ending with "[LowAmmo]"
it will also say disabled next to the name of the turret if its not functional or off.
You also have the ability to ignore turrets so they don't show up in the list nor trigger the alarm.

-------------------------------------------------
Settings
-------------------------------------------------

In the code there are two percentage variables for you to tinker with for instance on 10x inventory servers
There is the large turrets percentage at 20%
Then interior turrets at 1%
This is because interior turrets mags barely have volume and thus count very low
There is also a Display_Low_Only setting, by default its false but if enabled the paired LCDs will display only turrets that are low on ammo omitting any that are above this threshold.
Turrets can be ignored by the script just add [LAIgnore] (case sensitive) to their name and then they won't show up on the LCDs nor will they trigger the alarm.


-------------------------------------------------
Timer Blocks setup
-------------------------------------------------

The script will also trigger two different timer blocks
First time block named "LowAmmoAlert"
This timer block will be triggered when a turret's storage contains less then its threshold set in the code.

Next is the "LowAmmoAlert"
This one is triggered once a Low Ammo Event has ended (when all turrets are stocked up again)

This is useful for giving control to you to do whatever you want with the timers, like blaring alarms or running assemblers.

If the timer blocks are being triggered try recompiling the script first!

Have fun!
4 Comments
Odinfin 21 Sep, 2019 @ 11:11am 
Works Great, thanks for the quick update.
Torca  [author] 21 Sep, 2019 @ 7:15am 
Well now there is an omit feature just add [LAIgnore] to the turret's name to be ignored and theres a simple setting just change it to true in the code and it will only show low turrets.
Torca  [author] 21 Sep, 2019 @ 6:23am 
Currently there isn't any way but its a good idea. Probably going to implement it soon.
Odinfin 21 Sep, 2019 @ 5:13am 
This is a handy little script. Is there a way to omit turrets? as I'm using energy turrets. Also is there a way for only turrets that have low ammo to display on an LCD?