Space Engineers

Space Engineers

No hay suficientes valoraciones
Low Turret Ammo
   
Premiar
Favoritos
Favorito
Quitar
Tamaño
Publicado el
Actualizado el
5.857 KB
10 AGO 2019 a las 6:41
21 SEP 2019 a las 7:07
2 notas sobre cambios ( ver )

Suscríbete para descargar
Low Turret Ammo

Descripción
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 comentarios
Odinfin 21 SEP 2019 a las 11:11 
Works Great, thanks for the quick update.
Torca  [autor] 21 SEP 2019 a las 7:15 
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  [autor] 21 SEP 2019 a las 6:23 
Currently there isn't any way but its a good idea. Probably going to implement it soon.
Odinfin 21 SEP 2019 a las 5:13 
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?