[solved] location location location
Hi,
Im really new to programming in general and to open sesame in particular
so this question might be stupid.
Here goes - I show a visual stimuli on my screen and want then to show another when
just on the opposite side of the screen (referring only to the 'x' axis). I don't want to create
another variable for that, rather I would like to enter in the code area something like
'draw image -[target_position] 0 etc .... this form is unacceptable. anyone knows how should it be written ?
thank you
Comments
Hi,
OpenSesame script is a simple definitional syntax, and does indeed not support calculations etc. But it's easily implemented with a simple Python inline_script. Let's say that you have defined a variable myX somewhere, such as in a loop item. And you want to present a fixation dot at this X coordinate and also at the 'opposite' X coordinate. Then you make a sketchpad like this ...
draw fixdot [myX] 0 color=white show_if="always" draw fixdot [myOppositeX] 0 color=white show_if="always"... and at the start of the trial sequence you add an inline_script item with the following code in the prepare phase:
exp.set('myOppositeX', -self.get('myX'))Does that make sense? So you use a simple line of Python to accomplish what you want.
Hope this helps!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
thank you very much !
)