Space Engineers

Space Engineers

43 个评价
Enemy Detection Script - Turret Triggers Timer
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
1.527 KB
2018 年 12 月 26 日 上午 2:19
1 项改动说明 ( 查看 )

订阅以下载
Enemy Detection Script - Turret Triggers Timer

描述
This is a simple script which triggers a timer block when a turret detects an enemy.

-Rename the timer block to "Timer Block - EnDec" (without quotation marks) or change the name to whatever you want as indicated in the code.

-Rename a turret to "DetectorTurret" (without quotation marks) or change the name to whatever you want as indicated in the code.
20 条留言
Unruly 2023 年 10 月 6 日 上午 8:07 
Right. It checks for blocks named correctly. But it crashes with an exception if it doesn't find both blocks named correctly. That's all I was saying to Seth, now long gone..

Also, using a ctc only lets you detect from block weapons. I want to include detection from turrets.

Thank you for sharing your bps/mods, btw.
DaddyDamo  [作者] 2023 年 10 月 6 日 上午 12:43 
the code doesnt do anything besides check if a turret which is currently named whatever is in the code has detected something, and if it has, trigger a timer block. dont know why people are still using this script, its obsolete with the new turret controller block.
Unruly 2023 年 10 月 5 日 下午 12:02 
Hey Seth, it's been quite a while, but I'm sure the problem you were having is because you hadn't yet named both a timer block and a turret.
The code SHOULD detect when that's the case, but it doesn't.
Seth Stone 2021 年 1 月 3 日 下午 12:53 
Looks like its broken to me, also getting an error when i try to use
AngelMarc 2020 年 10 月 22 日 上午 4:24 
Mata52 2020 年 7 月 31 日 上午 9:34 
Nice script. Is it somehow possible to make a grid that detects an enemy (with that turret) send commands to another grid (like a base)? As far as I know the timer block cannot be set to give commands to other grids automatically but maybe there is a different script for that or some magical way?
Scrap 2020 年 1 月 8 日 下午 2:40 
I have an error when trying to use.
wyqydsyq 2019 年 11 月 30 日 上午 12:06 
@Hage Maoh set the timer block to rerun/recompile the PB running this script at the end of its action sequence
Hage Maoh 2019 年 9 月 2 日 下午 3:28 
Really needs some way to reset, or a cooldown between detection events. Seems like the turret detects once, and then the whole setup needs to be taken down and rebuilt
Thunderous Broadside 2019 年 8 月 30 日 下午 8:35 
"EnDec" wouldn't happen to be an Encoder Decoder, would it?