Group: Forum Members
Posts: 64,
Visits: 210
|
Hi all, am trying to use mouse position over a shape as a validresponse for branching. I am trying to use mouse position over three shapes (start, start2, start3) to branch from trial.choice to trial.TL_high. Can anyone see what I am doing wrong please <values> / x = -1 / y = -1 / trialcounter = 0 / reinforcement = 0 / agency = 0 / iteration = 0 </values>
<block search> / trials = [1-10 = search] </block>
<trial search> / stimulustimes = [1=clearscreen, bord, viewhole, hoop] / ontrialbegin = [picture.bord.hposition = 1px * mouse.x;picture.bord.vposition = 1px * mouse.y; picture.hoop.width = picture.hoop.width -.2%; values.iteration = values.iteration +1] / inputdevice = mouse / validresponse = (mousemove) / branch = [if (values.iteration == 430) { trial.choice; } else { trial.search; } ] /timeout =1 / recorddata = false </trial>
** NOTE start, start2, start3 are shape objects **
<trial choice> / stimulustimes = [1=clearscreen; 10=start3; 10=start2; 10=start] / ontrialbegin = [values.iteration = 0; picture.hoop.width = 100%] / inputdevice = mouseover / validresponse = (start, start2, start3) / recorddata = true / branch = [if (trial.choice.response == start) trial.TL_high] / branch = [if (trial.choice.response == start2) trial.TL_high] / branch = [if (trial.choice.response == start3) trial.TL_high] </trial>
<trial TL_high> / ontrialbegin = [values.x = mouse.x; values.y = mouse.y; values.agency=1] / ontrialbegin = [trial.TL_high.insertstimulustime(sound.high, 100)] / stimulustimes = [1=clearscreen] / timeout= (100) / recorddata = true </trial> <sound high> /items = high /playthrough = true /select = noreplace </sound>
<item high> /1 = "wave_high_fr1000.wav" </item> <shape start> / shape = circle / color = (0, 0, 200) / size = (100, 100) / position = (50%, 50%) </shape>
<shape start2> / shape = circle / color = (0, 200, 0) / size = (400, 400) / position = (50%, 50%) </shape>
<shape start3> / shape = circle / color = (200, 0, 0) / size = (800, 800) / position = (50%, 50%) </shape>
<picture hoop> / items = ("hoop.png") / erase = false / width = 100% / height = 100% </picture>
<picture viewhole> / items = ("Hole2.png") / erase = false / size=(3000, 3000) </picture>
<picture bord> / items = ("bord4.jpg") / erase = false / size=(5000, 5000) </picture>
|