[solved] Second keyboard response not being logged...
Me again (feeling like I live on this forum of late)!
I have finally dragged my experiment kicking and screaming into the working world. But... the essential responses are not being logged! I've tried various configurations for the various objects, the latest of which is below:
This is just a working file of a bigger experiment, but essentially further sessions are similar (I just find it an easier way to tweak issues without wrecking the actual experiment file).
My problem is that whilst the keyboard_response_script (and its associated keyboard_response object) log the responses ('z', 'm') very well, the cue_responses are just coming up as '0' in the relevant column of the logger file. This is the code I have for collecting responses for ongoing and cue responses (I claim no credit for the ongoing task code - not written by me, just for me):
# For the ongoing task: (corresponds to 'keyboard_response_script' in overview) # Determine correct response, depending on whether the words come from # the rhyming or the non-rhyming list if stim_pair in list_rhymes: correct_keyboard_response = 'm' if stim_pair in list_non_rhymes: correct_keyboard_response = 'z' # Set the correct response by giving the built-in OpenSesame variable # 'correct_response' a value: exp.set("correct_response", correct_keyboard_response) # For the cues: (corresponds to 'cue_response_script' in overview) # Get variables from GUI correct_cue_response = self.get('correct_cue_response') frame_colour = self.get('frame_colour') # Determine correct keyboard responses to session 1 cue if frame_colour == 'Green': correct_cue_keyboard_response = 'g' if frame_colour == 'Black': correct_cue_keyboard_response = '' # Set the variable 'correct_cue_response' with the values determined above exp.set("correct_cue_response", correct_cue_keyboard_response)
So either there is a bug or (more likely) my coding is wrong/incomplete. The only response not collected correctly is to the cues, so I'm guessing I've created the variables but not the ties that bind them....
I'm pretty new at this and it's had me banging my head in frustration! I've searched the forum history for similar problems, all for naught. Any help would surely save my sanity....