Space Engineers

Space Engineers

Terminal Block Manager
Handagotes  [developer] 23 Jan, 2018 @ 5:19am
Bug reports
Here you can write your TBML script that causes an error or works incorrect.
Если вы сделали TBML скрипт, который работает некорректно или вызывает ошибку в программном блоке, напишите его здесь.
Last edited by Handagotes; 30 Jan, 2018 @ 8:20pm
< >
Showing 1-15 of 43 comments
Plongo 1 Feb, 2018 @ 12:03am 
[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; https://steamhost.cn/steamcommunity_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  [developer] 1 Feb, 2018 @ 12:55am 
Originally posted by 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; https://steamhost.cn/steamcommunity_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.

Originally posted by 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.
Last edited by Handagotes; 1 Feb, 2018 @ 3:04am
Plongo 1 Feb, 2018 @ 2:59am 
Ah okay, Thank you heaps! This helps greatly!
Plongo 2 Feb, 2018 @ 2:31am 
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  [developer] 2 Feb, 2018 @ 3:39am 
Originally posted by 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.
Last edited by Handagotes; 7 Feb, 2018 @ 3:11am
Plongo 5 Feb, 2018 @ 5:24pm 
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  [developer] 5 Feb, 2018 @ 9:41pm 
Originally posted by 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 6 Feb, 2018 @ 12:40am 
Sweet, just reloaded the script and works! thanks heaps!
Plongo 7 Feb, 2018 @ 2:24am 
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  [developer] 7 Feb, 2018 @ 3:27am 
Originally posted by 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.
Last edited by Handagotes; 7 Feb, 2018 @ 3:28am
Plongo 7 Feb, 2018 @ 9:01pm 
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!
Last edited by Plongo; 7 Feb, 2018 @ 9:01pm
Plongo 16 Feb, 2018 @ 9:47pm 
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  [developer] 16 Feb, 2018 @ 11:38pm 
Originally posted by 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 17 Feb, 2018 @ 12:36am 
I was thinking that. Thank you!
Palp 24 Feb, 2018 @ 1:26pm 
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.
< >
Showing 1-15 of 43 comments
Per page: 1530 50