PennController for IBEX › Forums › Support › Can we randomize time with newTimer() ? › Reply To: Can we randomize time with newTimer() ?
March 21, 2022 at 6:05 pm
#7939

Keymaster
400+1200=1600, but 400+1600=2000. I was under the impression that you wanted a random duration between 400ms and 1600ms, not between 400ms and 2000ms
Also, I’m just realizing that I reference that variable in a function in .set
on the Var element, and because timerd1duration
is set in a Template
environment, by the time the function from set
is executed it will always have the value it got in the last generated trial, so my code won’t have the desired outcome. More details on the timeline of javascript code injection on this page
Jeremy