OS (e.g. Win10): Win10 PsychoPy version (e.g. 1.84.x): Latest Standard Standalone? (y/n) If not then what?:
**What are you trying to achieve?: To prevent participants shooting for a target with the joystick I want to add a specific time they need to hold the cursor over a target.
The task involves participants moving an image(cursor) with th joystick to different targets. I have initially successfully managed to ensure the routine ends when the joystick is held over an image with the following code.
When I add t=3 to this it moves to the next routine when 3 secs past from start of routine not when participant is holding over target for 3 seconds. I have therefore tried the following code:
Traceback (most recent call last):
File “C:\Users\wickw\Documents\PhD\Research planning\motor task\motor task 24.11\study_task_Day1\Study_Task_1_lastrun.py”, line 1170, in
if inTarget(3):
TypeError: ‘bool’ object is not callable
Experiment ended.
I have also tried to start a new clock when the cursor enters the image and reset it if it leaves. If the clock reaches 3 secs end routine but this gives no error message but does not work.
it is better to copy&paste code surrounded by triple ` than to post screenshots. Anyway, inTarget is a boolean-variable taking only True or False, correct?
So what do you intend to achieve with the code-lines 14-15 do?
cool. BTW it is triple , not triple '. See the difference in formatting of your code and my code. And you don't have to surround each line of code with triple , just one triple at the beginning and one triple at the end each in an extra row with no code.