
vincent.j

I’ve made a custom robot skill plugin and use the EZ_Builder.Scripting.Executor.StartScriptBlocking method to run commands. However, I can’t get it to properly run the Test Script in Script Manager:
Code in Script Manager - Test:Code:
ControlCommand("Auto Position", AutoPositionAction, "Disco Dance")
ControlCommand("RGB Animator", AutoPositionAction, "Spin")
SayWait("This test will make me dance and light up my eyes then stop.")
ControlCommand("Auto Position", AutoPositionFrame, "STAND", 25, 3, -1)
ControlCommand("RGB Animator", AutoPositionAction, "Idle")
When the above code is played via the Script Manager control, the robot dances and lights its eyes up while speaking through the PC.
Code in robot skill plugin:Code:
EZ_Builder.Scripting.Executor executor = new EZ_Builder.Scripting.Executor();
executor.StartScriptBlocking(EZ_Builder.Scripting.Compiler.Compile("ControlCommand(\"Script Manager\", ScriptStartWait, \"Test\")"));
However, the code in the robot skill plugin only speaks and doesn’t move or change its eye LEDs at all.
Does anyone know how to fix this?
NB: Disco Dance and Spin both repeat so I can’t wait for their status variables to be cleared.
Are you trying to solve the issue: https://synthiam.com/Community/Questions/Waiting-for-Audio-from-Soundboard-PC-to-Finish-18344 with a custom plugin ?
Yes, but I'd also like to know how to solve this post's problem too. I have a feeling it's got to do with the executor overwriting the previous commands but I'm still not sure why it behaves differently when calling it from the ARC GUI.
That script will execute all commands one after another super fast. There's nothing waiting for anything to complete.
for example...
Code:
@DJ, the code got stuck at the WaitFor($AutoPositionStatus = 0) line because the Disco Dance action repeats.