Group: Administrators
Posts: 13K,
Visits: 104K
|
The basic mechanics go like this:
<values> / points_available = 100 / problem_number = 1 / numberoftries = 0 / score = 0 </values>
<block myblock> / trials = [1-4 = selectproblem] </block>
<trial selectproblem> / ontrialbegin = [values.points_available = 100; values.numberoftries = 0; values.problem_number = list.problemitems.nextindex; ] / trialduration = 0 / recorddata = false / branch = [trial.problemtrial] </trial>
<trial problemtrial> / ontrialbegin = [values.numberoftries += 1] / ontrialbegin = [if (values.numberoftries > 1) values.points_available -= list.subtractpoints.nextindex; ] / ontrialend = [if (trial.problemtrial.correct) values.score += values.points_available; ] / stimulusframes = [1=problem, points, correctanswer, wronganswer] / inputdevice = mouse / validresponse = (correctanswer, wronganswer) / correctresponse = (correctanswer) / branch = [if (values.numberoftries < 5 && trial.problemtrial.error) trial.problemtrial] </trial>
<list problemitems> / poolsize = 4 / replace = false </list>
<list subtractpoints> / poolsize = 10 / replace = true </list>
<text problem> / items = ("Problem A", "Problem B", "Problem C", "Problem D") / select = values.problem_number </text>
<text points> / items = ("This is try #<%values.numberoftries%>. You can win <%values.points_available%> points. You have won <%values.score%> points so far.") / position = (50%, 15%) </text>
<text correctanswer> / items = ("Correct Answer to Problem A", "Correct Answer to Problem B", "Correct Answer to Problem C", "Correct Answer to Problem D") / select = values.problem_number / vposition = 75% / hposition = list.hpos.nextvalue </text>
<text wronganswer> / items = ("Wrong Answer to Problem A", "Wrong Answer to Problem B", "Wrong Answer to Problem C", "Wrong Answer to Problem D") / select = values.problem_number / vposition = 75% / hposition = list.hpos.nextvalue </text>
<list hpos> / items = (35%, 65%) / selectionrate = always </list>
|