Hello everyone,
I am having a struggle on building an online experiment with Pavlovia and I was hoping if anyone could give me some guidance.
The two big challenges that I am having specifically to Pavlovia is:
- Issues with the conditional phrases
- Getting Typed response that resonates with the participant’s screen; so basically participants could see what they typed.
For the first problem,
my experiment includes multiple conditional phrases and for the offline version (which works flawlessly) I have used “continueRoutine = True” and " ‘customized loop name’.finished = True" to achieve that.
So, my Excel file is called “itemTypes” and this includes a column called “condition”. variable “condition” includes 0 or 1 values. My psychopy experiment is composed of two Routines: “Part 2 Word Pair” and “Change Detection”. If the “condition” variable is 0, then the “Change Detection” routine should be skipped. For this, in the “End Routine” of “Part 2 Word Pair”, I embedded the code
in Offline (these codes works)
[Py Code]
if (condition == 0):
continueRoutine = False
OR
if(condition == 0):
Part2loop.finished = True
#Part2loop is the custom loop that contains both Routine
in Online version, (these codes don’t work.)
[Py Code]
if (condition == 0):
trials.finished = True
OR
if(condintion == ‘0’):
trials.finished = True
SkipThisTrial = True
continueRoutine = False
else:
trials.finished = False
SkipThisTrial = False
continueRoutine = True
These codes don’t work properly in Pavlovia experiment eventhough I tried putting continueRoutine = True code into the ‘Each Frame’ tab.
Could anyone help me with this issue?
Also, for the second problem, I just need some guidance on getting the typed response.
for offline, I have used
Begin Routine
modify = False
ResponseType.text = ‘’
event.clearEvents(‘keyboard’)
#ResponseType is $ResponseType in the empty word box
Each Frame
if(ChngDetecKey2.keys == ‘p’):
continueRoutine = False
keys = event.getKeys()
if len(keys):
if ‘space’ in keys:
ResponseType.text = ResponseType.text + ’ ’
elif ‘backspace’ in keys:
ResponseType.text = ResponseType.text[:-1]
elif ‘lshift’ in keys or ‘rshift’ in keys:
modify = True
elif ‘return’ in keys:
continueRoutine = False
else:
if modify:
ResponseType.text = ResponseType.text + keys[0].upper()
modify = False
else:
ResponseType.text = ResponseType.text + keys[0]
End Routine
thisExp.addData(“typedWord2”, ResponseType.text)
#typedWord2 is the word box’s name with $ResponseType in it.
Thank you for the help and I hope everyone is have a safe and healthy summer!