Script error on my pavlovia experiment on tablet

Does this mouse component work as expected on a computer?

The tablet you are using may not be recording clicks correctly. If that is the case, then you could instead have the following code:

Begin Routine

mouseRec = mouse1.getPos()
response = 0

Each Frame

mouseLoc = mouse1.getPos()
if t < .05:
     pass
elif mouseLoc[0] != mouseRec[0] or mouseLoc[1] != mouseRec[1]:
     mouseRec = mouseLoc
     if img1.contains(mouse1):
          response = 1
          continueRoutine = False
     elif img2.contains(mouse1):
          response = 2
          continueRoutine = False
     elif img3.contains(mouse1):
          response = 3
          continueRoutine = False
     elif img4.contains(mouse1):
          response = 4
          continueRoutine = False
1 Like