Looping Scripting Recorder Question

 
#1

I need a little input. I'm trying to use ControlCommand() in a script to loop a 60 second prerecorded animation that used the scripting recorder. I have the ability to play forward and reverse, but I'd like to be able to loop the animation indefinitely. Seems simple but i must be missing something.

#2

If you have the pre-recorded script change a variable at the end, you can wait for the variable to change in the cue-ing script and then loop back to the start and wait.

Cueing script would be:

Code:


:loop
$variable = 0
Controlcommand()

WaitFor($variable = 1)

Sleep(500)
Goto(loop)



Pre-recorded script should end with:

Code:


$variable = 1

#3

Code:


:loop

ControlCommand("Recorder", PlayForward)

# Pause for 90 seconds
sleep(90 * 1000)

goto(loop)

#4

@dj,
That's how I wrote the script the first time, but would only run the sprint recorder once with an error that the ControlCommand() line "is a background worker is currently busy and cannot run multiple tasks concurrently." Stops after playing once.

I have clean new project with nothing else but one script recorder.

#5

Change the sleep time to give the recorder enough time to finish

Code:


:loop

ControlCommand("Recorder", PlayForward)

# Pause for 92 seconds
sleep(92 * 1000)

goto(loop)

#6

Ok I used 500 ms. Will try with longer sleep.

#7

Yeah - I can add a variable that will keep the state in a future release for you if this is a control used often

#8

Yes that would be great! I use it script recorder often to blend and stack animations using the touch pad. Having a way to loop those animations indefinitely, would be so beneficial.

#9

@DJ,
I'm trying to get some similar looping random type movements. I've tried the Personality generator for the first time. I like the idea, but it says" ControlCommand is not supported for this control" ( this was a script recorder animation). It would be nice to be able to call up various prerecorded script recorders for random animations as well. Is this possible now or something for the future, perhaps?

Edit: A "stop" added to the ControlCommand would be great as well.

#10

@DJ,
I don't use the recorder in any of my projects yet but would the ScriptStartWait work?