RPN: rand always return 1, how to use seed is obscure

Hello, in below code rand return always 1 not a rand beween 0 and 1 even if
it’s seeded once per second. Any hints ? tia /SSW (L:xml_anim_init,bool) !
if{ (E:Absolute Time, seconds) (>L:xml_anim_start, seconds) 1
(>L:xml_anim_init,bool) } els{ (E:Absolute Time,seconds) (L:xml_anim_start,
seconds) - (>L:xml_anim_lap, seconds) (L:xml_anim_lap, number) seed } rand
(>L:xml_rand,number) (L:xml_rand,number) 500 * (>L:XMLVAR_air_hose, number)

Hello @MarioMotta , I’m not sure but I think it’s because you always use the
same seed number ( (L: xml_anim_lap , number) seed) You can try replacing
(L:xml_anim_lap, number) seed by (E:Absolute Time, seconds) seed to see if
it’s better Regards, Boris

Hello, thanks for answer, code changes seed once per second (Frequency=1). I
have tried also using a seed initiated once, it should have produced a random
sequence, but it does’nt. It seems that rand output can be used only in read,
trying to assign rand (>L:xml_rand,number) produces always a 1. /Mario