I’ve got case where I’ve pre-built some AnimationBuilders, and I’m selecting a random builder, fetching it, getting the configured animation duration from the builder, and using this as a timeout while the builder plays.
In a Sequence there is an ExecuteScript that gets the builder and puts it in the notepad, gets the configured duration and puts that in the notepad, then calls play on the builder.
This is followed by a TimeoutJS that should return a time based on the delay stored in the notepad. But the TimeoutJS keeps starting before the builder has finished fetching and setting the delays.
I’ve tried four things:
What I described above. Set notepad.delay from the builder duration. When I get to the TimeoutJS, notepad.delay is undefined.
Just set notepad.builder in the ExecuteScript, and put the call to getConfiguredAnimationDuration in the TimeoutJS. This fails because notepad.builder is undefined.
Set a StartOnCondition decorator on TimeoutJS with a condition of ‘return notepad.builder’, so theoretically the TimeoutJS should not even start until notepad.builder is defined. But it starts anyway, and crashes because notepad.builder is not defined.
Set a SucceedOnCondition decorator on the ExecuteScript with a condition of ‘return notepad.builder’; No change.
My code with this issue is at GitHub chrooke/jibo-knock-knock/tree/sync-problems
The BT with the issue is behaviors/attitudes/react.bt.
jibo module: 2.0.5
behviorify module: 1.0.0