Space Engineers

Space Engineers

Not enough ratings
Turret Alarm [Deprecated]
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
1.386 MB
27 Sep, 2020 @ 11:03am
11 Jan, 2021 @ 5:33pm
6 Change Notes ( view )

Subscribe to download
Turret Alarm [Deprecated]

Description
This script is now deprecated. If you want to use it functionality, consider to use the V2 version

A small script that turns your turrets into an automatic alarm that lights a beacon if an enemy is detected
Can be used both with WeaponCore and in vanilla

Update 2021.1
Added automatic updating of the list of used blocks
Added information output on the LCD panels
Added a forced override for the using mode
Added attempts to connect to the WeaponCore API

Fixed a situation that led to "Script is too complex"
Fixed a bug that caused WeaponCore turrets is not change the state of the script

Notes
Automatic updating of blocks starts approximately every 3 seconds (at the moment, the update depends on the game ticks directly) and allows you to change the blocks used and tracked by the script without manually restarting it. To disable this function, the script has a special switch in the parameters section.

If necessary, you can switch the script to a specific mode (WeaponCore or Vanilla). To do this, set the "forcedModeOverride" parameter to one of three modes: 0 - automatic, 1 - Vanilla, 2 - WeaponCore. If you manually change the script mode, its functioning is not guaranteed.

For the convenience of tracking the status of the script, it is now possible to display its information on the LCD panel. To do this, add the prefix [TA LCD] to the required panel. If you want to display information on a specific panel in a block with multiple LCD's, then you need to add a prefix with the panel number in the list of block panels. For example, to display script state on the right monitor of Control Seat, you will need to add the following prefix to the block: "[TA LCD][2]"

LINKS
TIMER VERSION
WeaponCore Mod

Thanks to:
Sigmund Froid and his api guide for WeaponCore
Xaker_Two for testing and contribution in some features

Warning
100% functioning of the script is not guaranteed due to the use of the WeaponCore API, which may change from time to time, but is pursued as the final goal.

Problems?
If you have any problems with the script, please write to the Troubleshooting discussion
15 Comments
Foltast  [author] 15 Feb, 2021 @ 7:02am 
Hi, your suggestion is already realised as Turret Alarm V2, you can check it by link above ("TIMER VERSION")
Josef 13 Feb, 2021 @ 1:26am 
Could you maybe add a function that makes the script start a timer block?
Foltast  [author] 11 Jan, 2021 @ 5:55pm 
New version is released
Foltast  [author] 10 Jan, 2021 @ 10:21am 
I found the source of the problem, I suspected that there might be problems with the way to get the status of turrets. The railgun you are talking about does not change the heat value by which the script determines the state of the turrets. This is probably a feature of the mod you are using. I will try to find a solution to this problem
Kontu 10 Jan, 2021 @ 9:41am 
Beacon and pb were the last blocks placed on the grid; using the railgun turret for large grid from this https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2323902217
Foltast  [author] 9 Jan, 2021 @ 11:09am 
Hi Kontu! If you have replaced turrets, changed the name of the beacon, or replaced its block, then you need to recompile the script. If this does not help, please let me know which turrets you are using (I need a link to the workshop page)
Kontu 5 Jan, 2021 @ 7:01am 
https://i.imgur.com/LpGMs08.png
https://i.imgur.com/ZFAPtVd.png
`string beaconName = "WCBeacon"; // Can be changed`
Weaponcore turret actively firing on a target; script sees nothing
Foltast  [author] 15 Oct, 2020 @ 10:21pm 
Important update - this script is now fully functional when using WeaponCore
Sigmund Froid 11 Oct, 2020 @ 2:29am 
PSA: DarkStar updated the API and broke the GetWeaponTarget and GetAIFocus functions; they have been updated to use MyDetectedEntityInfo, changes are already included in the guide.
Foltast  [author] 9 Oct, 2020 @ 10:13am 
I liked that idea so i made it ASAP :D