Space Engineers

Space Engineers

Turret Alarm v2
148 Comments
Foltast  [author] 2 Oct, 2024 @ 7:19am 
AFAIK there is no API for searchlights, so no
Creamy Catboy 2 Oct, 2024 @ 3:29am 
Is there anyway to use Searchlights instead of turrets?
<#690b04>0micron 23 Sep, 2023 @ 11:15am 
Thanks very much!
Foltast  [author] 23 Sep, 2023 @ 10:40am 
Yep, turrets should be on for the script
With this script there is no other way to detect, no
<#690b04>0micron 23 Sep, 2023 @ 9:19am 
This may be a dumb question but the turrets have to be on for this script to work correct? Is there a way for this script to detect enemies before turrets begin firing at them?
Kham 16 Jul, 2023 @ 7:57am 
@Sir Connery in the Custom Data for the PB you can change the name of the timers it's looking for so you could name them however you want.
Kham 16 Jul, 2023 @ 7:53am 
@Foltast thanks man, I'll check it out! :)
Sir Connery 16 Jul, 2023 @ 4:46am 
A small non-essential request. The timer block has to be named TriggerDetect. If it was possible to just have blocks including the name for example. Timer TriggerDetect. So I could keep using my naming conventions for everything. Same for the LCD.

I can live without it, but it would declutter my Control Panel and having every Timer in the same place is a comfort in a game with 100s of functional blocks.
Sir Connery 16 Jul, 2023 @ 4:46am 
Just letting you know this is an essential script for me. Good work.

I can trigger my whole base defence setup with it when the Turrets detect an enemy. Lights, choppers launching to defend with the automation blocks etc.
Foltast  [author] 15 Jul, 2023 @ 10:05am 
Should be done :)
Kham 24 Jun, 2023 @ 5:03pm 
Thanks man, I'll admit I'm using the script for a rather edge case scenario so I guess most people would want both timers.
Foltast  [author] 24 Jun, 2023 @ 4:52pm 
I'll think what I can do, sure
Kham 24 Jun, 2023 @ 4:32pm 
Hey there, I was wondering if there's a way to disable the need for a "lost target" timer block? I don't need it for my current usage but the script doesn't seem to like if it doesn't exist on the grid and wont trigger the "lock target" timer block even though it shows a target lock in the terminal.
kinngrimm 13 Mar, 2023 @ 4:04pm 
k, thx
Foltast  [author] 13 Mar, 2023 @ 2:13pm 
a) depends on the turrets range b) depends on antenna settings
kinngrimm 4 Mar, 2023 @ 5:49am 
what are the range limitations a) for the detection and b) for the sending it back home?
iCeCoPe 1 Mar, 2023 @ 8:48am 
Thanks for reply, that Counts :) I wanted to know where the TAG is entered. I then entered the TAG in the block, antenna. And then it worked.
Foltast  [author] 19 Feb, 2023 @ 3:44pm 
Hi! Sorry for the delay (I hope this is still relevant lol!) broadcastTag should be configured in CustomData
iCeCoPe 12 Feb, 2023 @ 1:00pm 
Hello, how to use the broadcastTAG? In a block, or should write in CustomData? Or Rename Antenna in TAG? :)
Foltast  [author] 28 Jan, 2023 @ 2:53pm 
1) Yes, as you point out, antennas do not have this kind of functionality at the moment. Also, in case you need to remain as invisible as possible to the enemy (stealth ships or cloaked base), the turrets will have an advantage. And when using WC-based mods you can have radars (such as TR100 Oko from my mod), which can't shoot the enemy but have huge detection range.

2) Triggers were chosen as the most user-friendly and flexible solution, which allows you to set not only simple actions (turn off lights/close doors, etc.) but also set complex chains of actions and execute other scripts without having to change the code.

3) Not at the moment, but I plan to clone my script repos from a private git service on github in the near future
NorfolkDave 28 Jan, 2023 @ 1:32pm 
just had my first question answered over on reddit...antennas dont provide a list of entities detected.
That sort of shoots the idea I had out of the water lol
NorfolkDave 28 Jan, 2023 @ 12:36pm 
Just looking into making a script that would detect threats and turn on shields and turrets etc... was looking online and there was a link here and its lead to some questions.
1) why is it using a turret to detect an enemy and not a list of entities detected by an antenna? I had planed to iterate through the list of of entities detected by the antenna and trigger the alert if an entity is under 5k and hostile... by the time its in turret range it seems a bit late?
2) I can see it then triggers timer blocks, is that better than having the code do what you need it to do (turn on shields, alarms, turn on turrets, close doors etc)
3) do you have a github where I can look at the code while at work lol?
Atomic | 104th 10 Aug, 2022 @ 6:54am 
Ill try that, thanks man. I'll let you know if it fixes it
Foltast  [author] 7 Aug, 2022 @ 3:52am 
Try to change the values in CustomData of programmable block, it should work
Atomic | 104th 4 Aug, 2022 @ 4:38pm 
I've also tried manually editing the "Do Not Edit" section of the script with the values I wanted, and that's not done it either, again it could just be me not knowing C#, cause I'm a Python coder
Foltast  [author] 4 Aug, 2022 @ 7:53am 
I'll check what it could be
Atomic | 104th 1 Aug, 2022 @ 8:42pm 
I don't know if I'm just being stupid or what, but I cant get the Delay function to work. I'm trying to make the alarm come on as soon something is targeted, yet stay on for 5 minutes or so after its been lost

I've got both triggers delays set to "True" with 60 seconds each, and it seems to just not pick the settings up almost
Foltast  [author] 18 Jul, 2022 @ 1:01pm 
I will try to release a patch soon with additional optimization and possibly with another new feature :)

Regarding searchlight, I found out that there is no APIs for it at all, so until Keens fix this, my hands are tied
Sir Connery 15 Jul, 2022 @ 5:44pm 
This script has got a lot of new features since I last checked it. Noice.
Foltast  [author] 25 Jun, 2022 @ 12:20pm 
I'll see what I can do :)
Official Zealiux 25 Jun, 2022 @ 8:43am 
Oh I like that idea
Duckclub 24 Jun, 2022 @ 7:43am 
Is there a way to make this use Searchlights? I'd like to make this a non-hostile Alarm System and since Turrets won't lock w/o ammo I figured this is the best way
Cosmonaut 7 Apr, 2022 @ 10:42am 
I tried that, but I think since it's going off of WC master targeting, it's still triggering around allies and such.
Foltast  [author] 7 Apr, 2022 @ 4:48am 
Turret Alarm doesn't provide any settings for targeting, so if you want to ignore neutrals you should use the appropriate settings for your weapons (there should be a "Ignore neutrals" switch in terminal)
Cosmonaut 6 Apr, 2022 @ 9:07pm 
Any way to make this ignore neutrals with weaponcore targeting?
Foltast  [author] 18 Feb, 2022 @ 10:10pm 
Hi, custom turret control will be supported in the next update but I can't guarantee the support for WC version right now.
Chuckination, I don't have a repo for TA , but you can contact me on the discord server
Chuckination 18 Feb, 2022 @ 8:44pm 
I've been working on customization of this script to work with all WC threats, not just the ones detected by turrets. It still needs some work, but would you allow me to publish my edits with attribution towards your original work and leaving your original documentation and code intact as much as possible? Alternatively, do you have a github repo I could submit a PR to?
Jzeiine 18 Feb, 2022 @ 8:17pm 
does it support detection from WC Custom Turret Control?
Foltast  [author] 12 Feb, 2022 @ 4:22pm 
If I understand you correctly, then you just need to specify the timers and groups of turrets you need in the script instances (step 3 in the setup and optional steps). The number of running script instances on the ship is not limited by anything other than the performance of the game itself
RJ 12 Feb, 2022 @ 11:04am 
Is there a way to make this work with multiple instances of the script on the same ship working with specific timers and turrets?

Im trying to make something using some energy intense weapon mods that draw power even in standby and want each respective gun to enable automatically if theres something in its field of fire and turn off when theres nothing to shoot.
Foltast  [author] 8 Feb, 2022 @ 3:41pm 
No problem! :)
Wartank 8 Feb, 2022 @ 3:15pm 
Thanks man! that was quick indeed!
Foltast  [author] 8 Feb, 2022 @ 3:07pm 
That was minor API changes. Fixed
Foltast  [author] 8 Feb, 2022 @ 2:51pm 
It seems yes. It will take me some time to find and fix the problem (if the problem is on my side) however, the vanilla version should work stably
Wartank 8 Feb, 2022 @ 2:32pm 
Did the latest update break the script? I'm using WC weapons but it keeps switching back to Vanilla. When forcing it to WC it finds no turrets (while there certainly are turrets there)
Foltast  [author] 26 Jan, 2022 @ 11:43pm 
Hi! I checked the mod and for me it's very strange that radar is not searched by the script as a WC turret (as it should be and how it works with other turrets from mod) so it seems you need to ask Aryx to fix that on her side
Nimkaru 10 Jan, 2022 @ 1:57am 
Hello Foltast, would it be possible that you can make the Doppler Radar from AWE Weapons Pack (https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=2530716039) be recogniced as WC turret? Or would I need to talk to Aryx? It should be a turret which shoots invisible no damage projectiles from time to time.
Foltast  [author] 5 Jan, 2022 @ 11:04pm 
Updated to 2022.1, added forced disable of triggers
Foltast  [author] 5 Jan, 2022 @ 10:44pm 
HI, no doesn't use the soundblocks, but you can set up them with timers
Arcane9087 5 Jan, 2022 @ 7:36am 
does it use sound blocks