Hi,
I am currently implementing an experiment with 3 different routines:
first rountine “Stimuli”: the stimulus is presented with the request to solve the given task within 15 seconds max of time. If the participant solves the task before time is up, by clicking on a polygon they can end the routine and go on the next one.
second routine “Solution”: in this routine is possibile to enter the solution of the task just solved.
third routine “Feeling”: is possible to report the emotion felt during the task completion/ missed completion.
How do I code the: “Skip routine “Solution” if time is up in Routine “Stimuli”?”
NOTE: IF IN ROUTINE “Stimuli” THE TIME IS UP (the 15seconds are over) THE ROUTIN WILL END AUTOMATICALLY AND THE PARTICIPANT WILL NOT SEE THE ROUTINE “Solution”, BUT THEY WILL SEE DIRECTLY THE ROUTINE “Feeling”.
Thank you so much!
With your suggestion, now when the time is up, the Solution routine is skept.
However, can you help me adding an extra step?
The Stimuli routine has an arrow that the participant can press to skip to the Solution routine. If the participant solves the task before time is up, by clicking on a polygon they can end the routine and go on the next one, the Solution one. However with your suggestion this is not possible, the arrow is disabled. I would need a code line which tells me “if the arrow is pressed, egnor the request to skip Solution/ go to Solution and follow the normal loop”.
if Stimuli ends because arrow is pressed: show Solution
else if Stimuli ends because polygon is pressed and task solved: show Solution
else if Stimuli ends with no solution: skipSolution
That looks like Builder code not your code component. Please could you copy and past from your code component. My assumption, unless you say otherwise, is that the code comes from the End Routine tab in the Stimuli routine.
I tried as you suggested, using:
(in Stimuli < Code < End Routine)
if mouse_6.clicked_name != ‘arrow_6’:
skipSolution = True
It didn’t work, if I click or not is always showing me the Solution routine.
So I tryed again:
(in Stimuli < Code < Begin Routine)
skipSolution = False
(in Stimuli < Code < End Routine)
if mouse_6.clicked_name != ‘arrow_6’:
skipSolution = True
It didn’t work, if I click or not is always showing me the Solution routine.
So I tried to improvise, but I failed:
(in Stimuli < Code < Each Frame)
if mouse_6.clicked_name == ‘arrow_6’:
skipSolution = False
(in Stimuli < Code < End Routine)
if mouse_6.clicked_name != ‘arrow_6’:
skipSolution = True
Is possible I am missing something out, is there something elese I can try?
Thank you so much for your help, I really appreciate it!
Was it skipping when you just had skipSolution = True?
No.
The Solution routine was skipped only when there was “Skip if $ skipSolution” was setted in the Solution Routine setting. With no distinction between click or not click.