'Duration' field in Animations doesn't accept text global updated by a Flow

I was trying to simulate a Sample & Hold circuit with Flows to use with animations. I coupled it with an RNG global that updates every second, so it’s supposed to take a random number X from the global and pass it to another (S&H) global every X seconds. That is, sample X and hold it for X seconds.

It was meant to be used with shape Animations to add some randomness, i.e. make the shape repeat an animation but randomize the duration every loop. However the Duration field, when set to Formula and referenced the S&H variable, returns an error err: unknown, yet it doesn’t do that when referenced the RNG variable.


Reproduction steps:

  • Create a text global > rng

    • Formula > $tu(rnd, 1/60, 1, 10)$
  • Create a text global > sh

  • Create a flow

    • Trigger: Formula > $gv(rng)$
    • Action: Delay > $gv(rng)$
    • Action: Formula > $gv(rng)$
    • Action: Set Global Var > sh
  • Create a shape

    • Animation: ReactOn > Loop
    • Animation: Duration > $gv(sh)*10$

Expected: Duration field should accept the value X from the sh global and update to X every X seconds.

Actual: Formula editor returns err: unknown, text preview shows the default Text Preview and the Duration value stays on the default 10.