Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Problem accessing the cursor_x variable

I would like to make a simple Corsi block design, in which blocks first flash in a pattern, and then the participant clicks on them to replicate the order. I would ultimately like to convert the script to OSWeb. I would also like to make the blocks flash with a color when clicked, as feedback to the participant.

Since all of my blocks are on the same y-axis, I thought I could achieve this by using the cursor_x variable as a runif conditional in sequence element. But I get the error File "<conditional statement>", line 1, in <module> NameError: name cursor_x is not defined

I imagine my problem is related to the one described in this post, but the solutions there don't seem to work for me. I can see in the variable inspector that mouse clicks are being registered for cursor_x, so I can't figure out why I can't use that information. I have tried pre-defining cursor_x using a javascript block, but that didn't help. I have also tried handling the conditionals using a java-script block, but that doesn't work either. The message is always the same: that cursor_x is undefined. Help, anyone?? A sample experiment is attached.

/Ethan


https://forum.cogsci.nl/discussion/6878/mouse-undefined

Comments

Sign In or Register to comment.