Branch Conditional Logic


Author
Message
Psych_Josh
Psych_Josh
Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)
Group: Forum Members
Posts: 85, Visits: 397
Dear all,

I'm having a minor issue with some branch conditional logic - 

<trial response>
/stimulustimes = [500 = cross]
/validresponse = ("Q", "P")
/branch = [if (trial.response.response == "Q") trial.trialhappystart]
/branch = [if (trial.response.response == "P") trial.trialsadstart]
/recorddata = false
</trial>

<trial trialhappystart>
/stimulustimes = [500 = cross]
/correctresponse = (" ")
/pretrialpause = 500
/branch = [trial.trialhappyface]
/recorddata = false
</trial>

<trial trialsadstart>
/stimulustimes = [500 = cross]
/correctresponse = (" ")
/pretrialpause = 500
/branch = [trial.trialsadface]
/recorddata = false
</trial>

Somehow, it starts the trial, registers the response (Q or P), but loops back to itself, instead of branching to the designated trial. I thought this would be quite simple, and have looked at multiple examples, but somehow mine fails. If it's relevant, at the block level I have:

<block TimeEstimation>
/onblockbegin = [values.onset=0; values.intervalestimation=0; values.stimuli=0;]
/preinstructions = (main)
/trials = [1-5 = noreplace(response)]
</block>

Many thanks in advance,
Josh
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search