I am attempting to use a random function to determine feedback values, but I am having some trouble.
As I have learnt, it is impossible to use “import” functions in Pavlovia, so I am having to find a way around using “import random”.
However, I have fallen at the first hurdle; if I simply use the Math.random() function in a JS code component, my experiment does not work at all. I simply typed “x = Math.random()” and I put “$x” in a text component (set every frame) in the same routine. The experiment then crashes when I run it.
I am sure I am just making a very simple mistake somewhere - can anyone point me in the right direction?