Group: Forum Members
Posts: 42,
Visits: 220
|
Hi Dave, thank you very much for the response. It is very helpful!
I'm not sure why my code doesn't appear to be working however since I am using the scan codes for the responses. Since the /branch looks to be working properly maybe there is a problem with my trials that are being branched to. Currently what is happening is it initiates trial main which asks for the decision of easy or hard. When I press the key to choose a difficulty it appears to keep calling trial.main since the screens display should change to the maineasy screen but it continues to present easy/hard decisions. Do you have any recommendations of where to look in my code for inconsistencies? Or maybe it would be helpful to upload my program? Thank you again for your support.
Dan
/responsekeyeasy = 31 /responsekeyhard = 38
<trial main> /ontrialbegin = [values.stiminterval = list.stimulusinterval.nextvalue] /ontrialbegin = [text.easytask = list.easyrewardamount.nextvalue] /ontrialbegin = [text.hardtask = list.hardrewardamount.nextvalue] /ontrialbegin = [text.probwinchance = list.probwin.nextvalue] /ontrialbegin = [trial.main.insertstimulustime(text.probwinchance, values.stiminterval)]
/stimulustimes = [0 = focus, probwinchance, probtext, easytask, easytasktext, hardtask, hardtasktext] /validresponse = (31, 38) /correctresponse = (38) /ontrialend = [trial.main.resetstimulusframes()] /pretrialpause = values.pause /timeout = 5
/branch = [if (trial.main.response == values.responsekeyhard) trial.main_hard] /branch = [if (trial.main.response == values.responsekeyeasy) trial.main_easy]
/ontrialend = [if (trial.main.response == values.responsekeyhard) values.choseHard ="HARD" else values.choseHard = "EASY"]
</trial>
<trial main_easy> /ontrialbegin = [values.rewardamount = text.easytask] /stimulustimes = [0 = probwinchance, easytask, easytasktext] /timeout = 7 /ontrialend = [trial.main_easy.resetstimulusframes()] /branch = [trial.main] </trial>
<trial main_hard> /ontrialbegin = [values.rewardamount = text.hardtask] /stimulustimes = [0 = probwinchance, hardtask, hardtasktext] /timeout = 21 /ontrialend = [trial.main_hard.resetstimulusframes()] /branch = [trial.main] </trial>
<block mainblock> /onblockbegin = [text.focus.textcolor = values.focuscolor; text.focus.textbgcolor = values.screencolor]
/trials = [1-5= main] /onblockbegin = [block.mainblock.screencolor = values.screencolor] /preinstructions = (instruct) /postinstructions = (endofexp) /stop = [trial.main.count == values.maxtrialnumber] </block>
|