Thanks to your numerous advices, I am nearly done programing this experiment! Nevertheless, I am still facing different issues I haven't been able to solve by myself yet.
#1 : I need to define a correct answer with each problem BUT I also need to associate a text element with a picture element and a value.
When I do that I don't get the right answers anymore :
<values>
/ problemnumber = 0
</values>
<list answers1>
/ items = ("no", "no","yes", "yes")
/ selectionmode =text.problemstim_frame.currentindex
</list>
<text problemstim_frame>
/ items =problemitem_frame
/ fontstyle =("Arial", 15pt, true)
/ txcolor = (255, 0,0)
/ position = (50, 30)
/ select =picture.problemstim_stimuli.currentitemnumber
/ erase = false
</text>
<picture problemstim_stimuli>
/ items =problemitem_stimuli
/ position = (50, 30)
/ select =values.problemnumber
/ erase = false
</picture>
If I do that instead, it works fine but it isn't associated with a value anymore :
<picture Question_0click>
/ items = question_0click
/ position = (50, 30)
/ select = text.question_opposite_0click.currentindex
</picture>
<text question_opposite_0click>
/ items = question_opposite_0click
/ fontstyle = ("Arial", 15pt, true)
/ txcolor = (255, 0, 0)
/ position = (50, 30)
/ select = noreplace</text>
What do you think?
#2 : The second problem I can't solve is about the timer. I only want to reset the timer when a <trial showproblem> is starting (not when I ask for a cue).
<block myblock>
/ trials = [1=showproblem]
</block>
<values>
/ cuecount = 0
/ tasktimeout = 60000
/ tasktimeoutleft = 0
</values>
<trial showproblem>
/ ontrialbegin = [values.tasktimeoutleft = values.tasktimeout- trial.showproblem.elapsedtime]/ inputdevice = mouse
/ stimulusframes = [1=problemstim, hintsreceived, requestcue, solveproblem, timer]
/ validresponse = (requestcue, solveproblem)
/ timeout = values.tasktimeoutleft
/ branch = [if (trial.showproblem.response == "solveproblem") openended.entersolution]
/ branch = [if (trial.showproblem.response == "requestcue" && values.cuecount < 6) trial.givecue else openended.entersolution]
</trial>
<trial givecue>
/ ontrialbegin = [values.cuecount += 1; ]
/ stimulusframes = [1=cuestim]
/ validresponse = (0)
/ trialduration = 0
/ branch = [trial.showproblem]
</trial>
<clock Timer>
/ mode = timer
/ resetrate = trial
/ erase = false
/ txcolor = (0, 255, 0)
/ txbgcolor = black
/ timeout = values.tasktimeout
/ position = (90%, 90%)
/ format = "mm:ss"
</clock>
#3 : My last problem concerns a likert scale I want to include.
Every 5 problems, I want to know if the participant is confident in the final answer ("yes" , "no") he just provided, before giving him a feedback on his performance ("congratulations", "you loose").
<values>
/ instructionnumber = 0
/ problemnumber = 0
/ cuenumber = 0
/ cuecount = 0
/ points_available = 100
/ problem_number = 1
/ numberoftries = 0
/ score = 0
</values>
<trial starttrial>
/ ontrialbegin = [values.instructionnumber = list.instructionitems.nextindex ; values.problemnumber = list.problemitems.nextindex;
values.cuecount = 0; text.cuestim_frame.resetselection(); picture.cuestim_stimuli.resetselection() ; list.cue_x.reset(); list.cue_y.reset();
values.points_available = 100; values.numberoftries = 0; values.problem_number = list.problemitems.nextindex ]
/ validresponse = (0)
/ branch = [trial.showproblem]
/ trialduration = 0
/ recorddata = false
</trial>
<trial showproblem>
/ ontrialbegin = [values.numberoftries += 1]
/ ontrialbegin = [if (values.numberoftries > 1) values.points_available -= list.subtractpoints.nextindex; ]
/ ontrialend = [if (trial.showproblem.correct) values.score += values.points_available; ]
/ inputdevice = mouse
/ stimulusframes = [1= instructionframe, instruction1_stimuli, instruction2_stimuli,instruction1_frame, instruction2_frame, problemstim_stimuli,
problemstim_frame, Is, ?, requestcue, yes, no, points, hintsreceived]
/ validresponse = (requestcue, yes, no)
/ iscorrectresponse = [trial.showproblem.response == list.answers1.nextvalue]
/ branch = [if (trial.showproblem.correct) trial.congratulation]
/ branch = [if ( trial.showproblem.response == "yes" || trial.showproblem.response =="no" && values.problem_number = 5) likert.valence]/ branch = [if (trial.showproblem.response == "requestcue" && values.cuecount < 6) trial.givecue else trial.error]
</trial>
<item confidencescale>
/1 = "How confident are you that your answer is correct?"
</item>
<text confidencescale>
/ items = confidencescale
/ position = (50, 10)
</text>
<likert valence>
/ stimulusframes = [1 = confidencescale]
/ anchors = [1 = "Not at all confident"; 4= "Moderately confident"; 7= "Very confident"]
/ numpoints = 7
/ anchorwidth=150px
/ inputdevice = mouse
/ branch = [trial.congratulations]
</likert>
<trial congratulations>
/ stimulusframes = [1=clearscreen, congratulations, next]
/ inputdevice = mouse
/ validresponse = ("next")
</trial>
<trial error>
/ stimulusframes = [1=clearscreen, error, next]
/ inputdevice = mouse
/ validresponse = ("next")
</trial>
Thanks again for your help!
Lucie