Space Engineers

Space Engineers

Terminal Block Manager
Handagotes  [开发者] 2018 年 1 月 23 日 上午 5:19
Bug reports
Here you can write your TBML script that causes an error or works incorrect.
Если вы сделали TBML скрипт, который работает некорректно или вызывает ошибку в программном блоке, напишите его здесь.
最后由 Handagotes 编辑于; 2018 年 1 月 30 日 下午 8:20
< >
正在显示第 1 - 15 条,共 43 条留言
Plongo 2018 年 2 月 1 日 上午 12:03 
[tbm script]
WHEN hastarget = TRUE DO
FOR program DO Run
FOR program2 DO Run

*Does not seem to run 'program' though it will run 'Program2'. Each program block is ment to detach from the main grid when run. Using this script for the two program blocks; http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=807454034
*Eventually i would like to have this;

[tbm script]
WHEN hastarget = TRUE DO
FOR program DO Run
WAIT 6
WHEN hastarget = TRUE DO
FOR program2 DO Run

Thanks again for the hard work!
Handagotes  [开发者] 2018 年 2 月 1 日 上午 12:55 
引用自 Plongo
[tbm script]
WHEN hastarget = TRUE DO
FOR program DO Run
FOR program2 DO Run

*Does not seem to run 'program' though it will run 'Program2'. Each program block is ment to detach from the main grid when run. Using this script for the two program blocks; http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=807454034

Thanks again for the hard work!
When camera block in the torpedo activates it's programmable block, torpedo detaches from main grid. From this moment camera block doesn't belong to main grid anymore, and terminal block manager can't handle camera's script and run the next instruction. This is not actually a bug in my script.
Try to set up terminal block manager script in each torpedo.

引用自 Plongo
*Eventually i would like to have this;

[tbm script]
WHEN hastarget = TRUE DO
FOR program DO Run
WAIT 6
WHEN hastarget = TRUE DO
FOR program2 DO Run

That script will not work the way it was intended, because 'WHEN' can't be embedded in another 'WHEN' block.
最后由 Handagotes 编辑于; 2018 年 2 月 1 日 上午 3:04
Plongo 2018 年 2 月 1 日 上午 2:59 
Ah okay, Thank you heaps! This helps greatly!
Plongo 2018 年 2 月 2 日 上午 2:31 
Also the "camera" does not detach from main grid and the camera is infact one Interior turret which im pulling the 'hastarget' from. only things which detach are the torpedos. only 2 things which detach are the program blocks (program/program2), which occurs after they are run by the manager. So shouldn't it work with this?

[tbm script]
WHEN hastarget = TRUE DO
FOR program DO Run
WAIT 6
FOR program2 DO Run

Thank you for your time!
Handagotes  [开发者] 2018 年 2 月 2 日 上午 3:39 
引用自 Plongo
Also the "camera" does not detach from main grid and the camera is infact one Interior turret which im pulling the 'hastarget' from. only things which detach are the torpedos. only 2 things which detach are the program blocks (program/program2), which occurs after they are run by the manager. So shouldn't it work with this?

[tbm script]
WHEN hastarget = TRUE DO
FOR program DO Run
WAIT 6
FOR program2 DO Run

Thank you for your time!
No, it will not work because after detaching programmable block from grid, terminal block manager can't find it and marks turret's script as an erroneous.
But i have a solution for you.
Put timer in grid and set up needed delay and action to run 'program2' block in it,
then rewrite turret's script to this:
[tbm script] WHEN hastarget = TRUE DO ONCE FOR program DO Run FOR <timer name here> DO Start

Then write the next script in timer's custom data:
[tbm script] WHEN hastarget of <interior turret name here> = false DO Stop

This should work fine.
最后由 Handagotes 编辑于; 2018 年 2 月 7 日 上午 3:11
Plongo 2018 年 2 月 5 日 下午 5:24 
brilliant idea. Though, for some reason the timer blocks tbm cannot find the interior turrets name "R_DESIGNATOR". Its spelt correctly, have made sure many times. Though if i remove the '_' from turret name and TBM it will identify the turret just fine. Is that an issue with your script or a compatibility issue with the other script?
Handagotes  [开发者] 2018 年 2 月 5 日 下午 9:41 
引用自 Plongo
brilliant idea. Though, for some reason the timer blocks tbm cannot find the interior turrets name "R_DESIGNATOR". Its spelt correctly, have made sure many times. Though if i remove the '_' from turret name and TBM it will identify the turret just fine. Is that an issue with your script or a compatibility issue with the other script?
Fixed in the last update.
Plongo 2018 年 2 月 6 日 上午 12:40 
Sweet, just reloaded the script and works! thanks heaps!
Plongo 2018 年 2 月 7 日 上午 2:24 
Seems to be an issue with timers after recent update patch.
for example i have this.
[tbm script]
WHEN hastarget = TRUE DO
FOR timer1 DO Trigger
FOR timer2 DO Start now

However timer2 will start count down but get stuck, by stuck i mean, if its count down from say, 6sec seconds it will hit 5seconds and not go beyond that point. When i go into the timer block It says on the right "Time to Trigger 5 but will not be changing. Also, nothing is set up to stop the timer block. Have also just set it up with the one script ( Your amazing script ) to see if other scripts were conflicting and still get issue.
Handagotes  [开发者] 2018 年 2 月 7 日 上午 3:27 
引用自 Plongo
Seems to be an issue with timers after recent update patch.
for example i have this.
[tbm script]
WHEN hastarget = TRUE DO
FOR timer1 DO Trigger
FOR timer2 DO Start now

However timer2 will start count down but get stuck, by stuck i mean, if its count down from say, 6sec seconds it will hit 5seconds and not go beyond that point. When i go into the timer block It says on the right "Time to Trigger 5 but will not be changing. Also, nothing is set up to stop the timer block. Have also just set it up with the one script ( Your amazing script ) to see if other scripts were conflicting and still get issue.

It is not actually a bug, because these actions are executing each program tick while logical expression is true. For such cases there is a 'ONCE' keyword. With it actions will be executed only once time, and will not be executed until logical expression become false and true again.
[tbm script] WHEN hastarget = TRUE DO ONCE FOR timer1 DO Trigger FOR timer2 DO Start

By the way, if you love my script, take a look at the Easy Automation script. It is a lot better than mine. I wish I could know about it before writing my script (◡_◡)
Thanks anyway.
最后由 Handagotes 编辑于; 2018 年 2 月 7 日 上午 3:28
Plongo 2018 年 2 月 7 日 下午 9:01 
Ahhhh, silly me. I was not sure how ONCE worked, but i got it now! Looking at that script, it gets a bit complicated, and the guides not to friendly, much prefer your script, does what i need and is easy to edit and understand!
最后由 Plongo 编辑于; 2018 年 2 月 7 日 下午 9:01
Plongo 2018 年 2 月 16 日 下午 9:47 
Me again. Can you explain why i am getting this error?

(tbm in rotor)
[tbm script]
WHEN IsAttached = FALSE DO
WAIT 0.5
FOR Rotor2 DO Detach
* Error log:
* Line 1: Block 'Rotor1' has no property 'isattached'.




Handagotes  [开发者] 2018 年 2 月 16 日 下午 11:38 
引用自 Plongo
Me again. Can you explain why i am getting this error?

(tbm in rotor)
[tbm script]
WHEN IsAttached = FALSE DO
WAIT 0.5
FOR Rotor2 DO Detach
* Error log:
* Line 1: Block 'Rotor1' has no property 'isattached'.

Unfortunately, information about terminal properties in the wiki is a bit obsolete. There is no more terminal property 'IsAttached' for rotor block. But I just added this in the additional properties, so your script should work fine in the last version of tbm. Thanks for report.
Plongo 2018 年 2 月 17 日 上午 12:36 
I was thinking that. Thank you!
Palp 2018 年 2 月 24 日 下午 1:26 
Hello,
Great script by the way!

This custom data:

WHEN ENABLED going_up AND,
currentPosition OF Piston_v1 = 10 AND,
status OF ConnectorTop = connected DO ONCE
DISABLE Merge_block_nacel_bottom

* Error log:
* Line 2: Block 'going up' has no property 'connected'.


The combinaison of Status and the OF keyword does not seems to work, or I'm using it wrong.
< >
正在显示第 1 - 15 条,共 43 条留言
每页显示数: 1530 50