Inquisit 5 text/values display problem


Author
Message
canlabstudies
canlabstudies
Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)
Group: Forum Members
Posts: 15, Visits: 115
Hi everyone, I'm trying to program a task that randomly shows "medium far 8 points", "medium far 9 points", and "medium far 10 points". But my code would only show "medium far 1 points", "medium far 2 points", and "medium far 3 points" (i assume that those are index numbers) and I can't figure out why. 
Here are my codes and thank you for your help!

<values>
/mediumfarpoints=""
</values>

<text mediumfarpoints>
/items= ("8","9","10")
/select = replace
/ selectionrate = always
</text>


<text distance1>
/items = ("Medium Far <%values.mediumfarpoints%> points")
</text>


<trial distancechoice>
/ ontrialbegin = [values.mediumfarpoints=text.mediumfarpoints.nextvalue;]
/ validresponse= (57)
/ stimulusframes = [1=distance1]
</trial>

<block >
/ trials = [1-3=distancechoice]
</block>

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
canlabstudies - Friday, September 1, 2017
Hi everyone, I'm trying to program a task that randomly shows "medium far 8 points", "medium far 9 points", and "medium far 10 points". But my code would only show "medium far 1 points", "medium far 2 points", and "medium far 3 points" (i assume that those are index numbers) and I can't figure out why. 
Here are my codes and thank you for your help!

<values>
/mediumfarpoints=""
</values>

<text mediumfarpoints>
/items= ("8","9","10")
/select = replace
/ selectionrate = always
</text>


<text distance1>
/items = ("Medium Far <%values.mediumfarpoints%> points")
</text>


<trial distancechoice>
/ ontrialbegin = [values.mediumfarpoints=text.mediumfarpoints.nextvalue;]
/ validresponse= (57)
/ stimulusframes = [1=distance1]
</trial>

<block >
/ trials = [1-3=distancechoice]
</block>

The code should read

<values>
/mediumfarpoints=""
</values>

<text mediumfarpoints>
/items= ("8","9","10")
/select = replace
/ selectionrate = always
</text>

<text distance1>
/items = ("Medium Far <%values.mediumfarpoints%> points")
</text>

<trial distancechoice>
/ ontrialbegin = [values.mediumfarpoints=text.mediumfarpoints.item(text.mediumfarpoints.nextindex);]
/ validresponse= (57)
/ stimulusframes = [1=distance1]
</trial>

<block myblock>
/ trials = [1-3=distancechoice]
</block>

or, more conveniently, use a <list> instead of a <text> element:

<values>
/mediumfarpoints=""
</values>

<list mediumfarpoints>
/items= ("8","9","10")
/ replace = true
/ selectionrate = always
</list>


<text distance1>
/items = ("Medium Far <%values.mediumfarpoints%> points")
</text>

<trial distancechoice>
/ ontrialbegin = [values.mediumfarpoints=list.mediumfarpoints.nextvalue;]
/ validresponse= (57)
/ stimulusframes = [1=distance1]
</trial>

<block myblock>
/ trials = [1-3=distancechoice]
</block>

canlabstudies
canlabstudies
Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)
Group: Forum Members
Posts: 15, Visits: 115
Dave - Friday, September 1, 2017
canlabstudies - Friday, September 1, 2017
Hi everyone, I'm trying to program a task that randomly shows "medium far 8 points", "medium far 9 points", and "medium far 10 points". But my code would only show "medium far 1 points", "medium far 2 points", and "medium far 3 points" (i assume that those are index numbers) and I can't figure out why. 
Here are my codes and thank you for your help!

<values>
/mediumfarpoints=""
</values>

<text mediumfarpoints>
/items= ("8","9","10")
/select = replace
/ selectionrate = always
</text>


<text distance1>
/items = ("Medium Far <%values.mediumfarpoints%> points")
</text>


<trial distancechoice>
/ ontrialbegin = [values.mediumfarpoints=text.mediumfarpoints.nextvalue;]
/ validresponse= (57)
/ stimulusframes = [1=distance1]
</trial>

<block >
/ trials = [1-3=distancechoice]
</block>

The code should read

<values>
/mediumfarpoints=""
</values>

<text mediumfarpoints>
/items= ("8","9","10")
/select = replace
/ selectionrate = always
</text>

<text distance1>
/items = ("Medium Far <%values.mediumfarpoints%> points")
</text>

<trial distancechoice>
/ ontrialbegin = [values.mediumfarpoints=text.mediumfarpoints.item(text.mediumfarpoints.nextindex);]
/ validresponse= (57)
/ stimulusframes = [1=distance1]
</trial>

<block myblock>
/ trials = [1-3=distancechoice]
</block>

or, more conveniently, use a <list> instead of a <text> element:

<values>
/mediumfarpoints=""
</values>

<list mediumfarpoints>
/items= ("8","9","10")
/ replace = true
/ selectionrate = always
</list>


<text distance1>
/items = ("Medium Far <%values.mediumfarpoints%> points")
</text>

<trial distancechoice>
/ ontrialbegin = [values.mediumfarpoints=list.mediumfarpoints.nextvalue;]
/ validresponse= (57)
/ stimulusframes = [1=distance1]
</trial>

<block myblock>
/ trials = [1-3=distancechoice]
</block>

Thank you so much! This helps immensely!!  
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search