Space Engineers

Space Engineers

Universal remote control script
 This topic has been pinned, so it's probably important
Grog  [developer] 30 Jul, 2021 @ 8:39am
Bug reports
Please tell me if something is wrong.
(Or leave a comment in main discussion if it is to say that's a great script ;D )
Last edited by Grog; 30 Jul, 2021 @ 8:40am
< >
Showing 1-9 of 9 comments
Rusted Droid 22 Feb, 2022 @ 4:50am 
Programmable block = Action = Run
Any example how i can use "Run" action?
Tying "Run HelloWorld MyFancyProgB"
Just give me command and script info but nothing happen.

Run = Action
HelloWorld = Argument (program in that PB)
MyFancyProgB = Block name
Grog  [developer] 22 Feb, 2022 @ 12:39pm 
Hello,
Never tried with a PB... so I just did: it worked :steamhappy:

Just remove "Helloworld".

--> "Run MyFancyProgB" it will run the prog in the targeted PB with default argument.

(A work around to pass arguments is to put a timer, with the PB run action with specific argument, and call the timer with "TriggerNow" action.)

I may add the argument option... to pass specific arguments to other PB...
Rusted Droid 22 Feb, 2022 @ 3:18pm 
@Grog
Will be handy if i can send argument with the message.
Scripts like Easy Automation 2.0 use arguments to execute code block that do actions, set properties, render LCDs.
Using "Timer blocks" is like extra step that i need to do with all code blocks created for EasyAutomation.
If i make 120 code blocks i need 120 timers just to do single Action=Run=HelloWorld
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=694296356&searchtext=easy+automation
Rusted Droid 22 Feb, 2022 @ 3:36pm 
With timers i can ask value from remote block but with argument send i can ask directly control ProgB on distant ship/base.

Also i have camera ruler script that i use argument text field to set distance and that is inpossible to ask with timers.
Grog  [developer] 23 Feb, 2022 @ 11:55am 
Possibility to pass arguments to Other grids PB added (or groups of PB).

Use brackets "{...}" after "Run" command.

Run {Test argument value} PB target name

So you can now say hello to the world ! :steammocking::steamhappy:

Note that if the targeted PB is busy it will fail and send a warning.
= try again when target PB ends his current action.

cya! :steamhappy:
Last edited by Grog; 23 Feb, 2022 @ 11:57am
Rusted Droid 23 Feb, 2022 @ 7:09pm 
I confirm this feature works. I find that buttons seens to not like multiple { } if used command directly with Button panel. Maybe Keen Bug

Example
On remote ship
1. -PB ArgumentPrompt- Run {prog(Helloworld)} MyFancyPB
2. -PB ArgumentPrompt- OnOff_Off SmallReactor
3. -ButtonPannel- Button1 = Run {prog(Helloworld)} MyFancyPB
4. -ButtonPannel- Button1 = OnOff_Off SmallReactor

On distant ship
1. Command recieved
2. Command recieved
3. No response
4. Command recieved

I need test this issue more
Last edited by Rusted Droid; 23 Feb, 2022 @ 7:12pm
Grog  [developer] 24 Feb, 2022 @ 12:45pm 
Hi,
I tried:
- another grid with a PBtoSendCMD + an antena
- a 4 button panel

On button panel:
1 - PBtoSendCMD Run command --> prompt command = Run TargetPB
2 - PBtoSendCMD Run command --> prompt command = Run {prog(Helloworld)} TargetPB
3 - PBtoSendCMD Run command --> prompt command = Run {test arg with(parenthesis)} TargetPB
4 - PBtoSendCMD Run command --> prompt command = Run {test arg} TargetPB

All 4 commands worked, I could not reproduce the problem.

Please try again after hitting the recompile button of both PBs.
Rusted Droid 26 Feb, 2022 @ 4:21pm 
I not think this is script issue but just buttons not like multiple { } when i assign command to button.
Anyway nice work!
Grog  [developer] 27 Feb, 2022 @ 4:37am 
Hi,
Yes it used the caracter "{" and "}" to find the argument value, so if there is these caracters in the argument it cannot find it (stop at the first closure caracters and the rest interfere with the block name).

So I just updated to make it custom:
At the begining of the script (3rd line) you'll find:

-> const string _PBcustomArgDelimiters = "{}";

Try to change the "{}" by "[]" (on receiver PB, but best to do it on sender too).

Cya :steamhappy:
Last edited by Grog; 27 Feb, 2022 @ 4:38am
< >
Showing 1-9 of 9 comments
Per page: 1530 50