Hi all,
I have been working on the same project for the better part of a year. A lot of you helped me and for that, I thank you and hope to enlist your help once more!
I currently have a routine set up that does the following:
-
Screen initialized with a rectangle of 10px x 100px
-
When you hold down
space
, the rectangle grows by a rate of:10*(t*5)
I would like to be able to stop the routine once the key is lifted.
I have tried to implement some of the different solutions on this forum but I believe that one of the lines in my growth argument might be causing issue:
for theseKeys in keys:
# The duration == None disables my ability to use duration
# as a metric, but I need it to have continuous growth!
if theseKeys == 'space' and theseKeys.duration==None:
sq.width = 10*(t*5)
keyrt = trialClock.getTime()
if keyrt is not None and keyrt > 2:
core.wait(.5)
continueRoutine = False
I have a text component that displays the rt
on the screen, I have it set to 2
as an arbitrary amount but would ideally like to do something like:
if theseKeys.duration >=2: continueRoutine = False
But no such duration
is stored!
Any help would be greatly appreciated!