Group: Forum Members
Posts: 85,
Visits: 397
|
Hi Dave,
Thanks for the info. In an attempt to adjust the calculations, I think I might be committing an error, as I acquire variously wrong results.
I have tried both I have tried both:
/ontrialend = [if (list.clock == 2) {values.score = values.score - 7} else if (list.clock == 3) {values.score = values.score - 14} else if (list.clock == 4) {values.score = values.score - 21} else if (list.clock == 5) {values.score = values.score - 28} else if (list.clock == 6) {values.score = values.score - 35} else if (list.clock == 7) {values.score = values.score - 48} else if (list.clock == 8) {values.score = values.score - 54} else if (list.clock) = 1 {true}]
within:
<trial audio_p_aa> /ontrialbegin = [values.audiotrial_starttime = block.rotate_p_block_aa.elapsedtime] /ontrialbegin = [trial.audio_p_aa.insertstimulustime(sound.possounds, values.delay = 258)] /ontrialend = [values.sound_starttime = values.audiotrial_starttime + sound.possounds.stimulusonset] /ontrialend = [trial.audio_p_aa.resetstimulusframes(0)] /ontrialend = [values.onset = values.sound_starttime - values.response_time] /ontrialend = [values.sound = sound.possounds.currentitem] /ontrialend = [values.score = (mod(values.sound_starttime,2500) - values.responsetrial_starttime)/41.6667] /ontrialend = [values.valence = "Positive"] /ontrialend = [values.elapsed_time = block.rotate_p_block_aa.elapsedtime; values.actual_time = values.sound_starttime + values.keep_rotating_for] /validresponse = (0) /trialduration = values.delay + values.keep_rotating_for + 1000 /recorddata = false </trial>
, as well as:
/ontrialbegin = [if (list.clock == 2) {values.difference = values.difference + 7} else if (list.clock == 3) {values.difference = values.difference + 14} else if (list.clock == 4) {values.difference = values.difference + 21} else if (list.clock == 5) {values.difference = values.difference + 28} else if (list.clock == 6) {values.difference = values.difference + 35} else if (list.clock == 7) {values.difference = values.difference + 48} else if (list.clock == 8) {values.difference = values.difference + 54} else if (list.clock) = 1 {true}]
within:
<openended action> /stimulusframes = [1 = action] /position = (50, 50) /buttonlabel = "Click here to advance" /linelength = 50 /charlimit = 30 /numlines = 1 /size = (500, 50) /recorddata = true /required = true /ontrialend = [values.response = openended.action.response] /ontrialend = [values.question = "Action"] /ontrialend = [values.difference = expressions.score] </openended>
These take their information from:
<video clock> /items = ("libet0.avi", "libet7.avi", "libet14.avi", "libet21.avi", "libet28.avi", "libet35.avi", "libet48.avi", "libet54.avi") /select = values.clockitem /playthrough = false /loop = true /erase = false /size = (20%, 20%) </video>
<list clock> /items = (1,2,3,4,5,6,7,8) /replace = false /selectionmode = random </list>
I don't profess to be anywhere near proficient at conditional logic, but I don't receive an error message when coding either into the script. Essentially, they are not modifying value.score nor values.difference in any way that I can observe, and certainly not towards acquiring the correct results. If you have the time (and the energy left for this script, as I know mine is significantly waning), please tell me where I've gone wrong.
Many thanks, Josh
|