[open] set (global?) variable for center of circle
hi there,
I'm not sure how to set a variable -- perhaps in an inline script? -- for later use in a sketchpad element.
I'm setting up an experiment where I present nine concentric circles as a target. In the introduction sketchpad element, I give an example target, but I've been moving them around a lot while I work on the element's setup. Rather than physically moving all nine circles, or manually changing the script nine times, I'd like to set a (global?) variable at the start of the experiment for the x and y coordinates of the center for all nine circles, then feed it to the "draw circle" command.
I'm very familiar with MATLAB but new to opensesame/python.
Any pointers on the best way to do this?
Thanks!
-b
Comments
Hi,
In short, the easiest way to set variables is with the
loopitem, after which you can refer to them with the square-bracket notation:[my_variable_name].However, I would recommend first walking through one of the basic tutorials, in which this principle is shown and explained in detail:
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!