Group: Forum Members
Posts: 85,
Visits: 397
|
Dear Inquisit forum, I have a slight issue based on conditional branching - effectively I need one trial to branch to another trial based on a valid response within specific latencies. The participant will see a countdown, followed by a stimulus once the countdown finishes. If the participant responds within 150ms either side of the stimulus presented (i.e., a total window of 300ms), then the trial needs to branch to one trial. If the participant responds outside of this window, or fails to respond at all, then the trial needs to branch to another. In this instance, the stimulus (BulbL) is presented at 4000ms, so I have tried:
<trial selfcountdownprac500> /stimulustimes = [1 = middle, PA_Name; 4000 = BulbL; 4100 = whiterectangle2] /ontrialbegin = [trial.selfcountdownprac500.insertstimulustime(list.countdown_500.nextvalue, 1000)] /ontrialbegin = [trial.selfcountdownprac500.insertstimulustime(list.countdown_500.nextvalue, 2000)] /ontrialbegin = [trial.selfcountdownprac500.insertstimulustime(list.countdown_500.nextvalue, 3000)] /beginresponsetime = 3000 /validresponse = ("q") /branch = [if(trial.selfcountdownprac500.elapsedtime>3850 && trial.selfcountdownprac500.elapsedtime<4150 && trial.selfcountdownprac500.response == "q") trial.selfprac500 else (trial.selfcountdownprac500.elapsedtime<3850 && trial.selfcountdownprac500.elapsedtime>4150) trial.selfclickprac500error] /recorddata = false /timeout = 4200 </trial>
However, this is simply not working, and not branching at all (i.e., it begins the trial again). I also need the trial to not advance to the next trial immediately; i.e., register the response, but not advance to the next trial on registering the response (hence the timeout). I realise I am probably making a fatal error somewhere, and may not even involve what I have attempted here, as I am not adept at using conditional logic, so any assistance would be greatly appreciated. There might be a very simple solution, as a part of me feels that I have overcomplicated this procedure in my head.
Many thanks, Josh
|