Displaying next items on trial


Author
Message
anabela_c
anabela_c
Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)
Group: Forum Members
Posts: 23, Visits: 75
Hi!

I have two set of items (i.e. 'item labelplayer1' and 'item labelplayer2') , I would like to displayed a different pair on each new trial (trial Round), however it keeps repeating the same ones. I guess it's due to the 'currentitem' but I can't find an alternative (e.g. a 'nextitem'). I also tried to set up an /ontrialbegin but as a beginner I didn't manage to do so...

Thanks in advance for your help!!

<trial Round>
/ ontrialbegin = [
values.roundnumber+=1;
]
/ stimulustimes = [0=round]
/ trialduration = 5000
</trial>

<item round>
/ 1 = "Trial <%values.roundnumber%> is about to start.

You have been paired with Player <%text.avatar1_round.currentitem%> and Player <%text.avatar2_round.currentitem%> "
</item>

<text Round>
/ position = (50%,50%)
/ items = round
/ size = (60%,10%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</text>

<text avatar1_round>
/ items = labelplayer1
/ fontstyle = ("Arial", 3%, true)
/ position = (29, 30)
</text>

<text avatar2_round>
/ items = labelplayer2
/ fontstyle = ("Arial", 3%, true)
/ position = (71, 30)
</text>

<item labelplayer1>
/1 = "McAdams"
/2 = "Atkinson"
/3 = "Bedward"
/4 = "Cuddy"
/5 = "Pappas"
/6 = "Tembo"
/7 = "Dunlop"
/8 = "Cleary"
/9 = "Gant"
/10 = "Watkins"
/11 = "Fleming"
/12 = "Conway"
/13 = "Matson"
/14 = "Stevenson"
/15 = "Farley"
/16 = "Osullivan"
</item>

<item labelplayer2>
/1 = "Angus2"
/2 = "Benson2"
/3 = "Jenkins2"
/4 = "Sherman2"
/5 = "Pappas2"
/6 = "Tembo2"
/7 = "Dunlop2"
/8 = "Cleary2"
/9 = "Gant2"
/10 = "Watkins2"
/11 = "Fleming2"
/12 = "Conway2"
/13 = "Matson2"
/14 = "Stevenson2"
/15 = "Farley2"
/16 = "Osullivan2"
</item>
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: 12K, Visits: 98K
anabela_c - 5/25/2021
Hi!

I have two set of items (i.e. 'item labelplayer1' and 'item labelplayer2') , I would like to displayed a different pair on each new trial (trial Round), however it keeps repeating the same ones. I guess it's due to the 'currentitem' but I can't find an alternative (e.g. a 'nextitem'). I also tried to set up an /ontrialbegin but as a beginner I didn't manage to do so...

Thanks in advance for your help!!

<trial Round>
/ ontrialbegin = [
values.roundnumber+=1;
]
/ stimulustimes = [0=round]
/ trialduration = 5000
</trial>

<item round>
/ 1 = "Trial <%values.roundnumber%> is about to start.

You have been paired with Player <%text.avatar1_round.currentitem%> and Player <%text.avatar2_round.currentitem%> "
</item>

<text Round>
/ position = (50%,50%)
/ items = round
/ size = (60%,10%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</text>

<text avatar1_round>
/ items = labelplayer1
/ fontstyle = ("Arial", 3%, true)
/ position = (29, 30)
</text>

<text avatar2_round>
/ items = labelplayer2
/ fontstyle = ("Arial", 3%, true)
/ position = (71, 30)
</text>

<item labelplayer1>
/1 = "McAdams"
/2 = "Atkinson"
/3 = "Bedward"
/4 = "Cuddy"
/5 = "Pappas"
/6 = "Tembo"
/7 = "Dunlop"
/8 = "Cleary"
/9 = "Gant"
/10 = "Watkins"
/11 = "Fleming"
/12 = "Conway"
/13 = "Matson"
/14 = "Stevenson"
/15 = "Farley"
/16 = "Osullivan"
</item>

<item labelplayer2>
/1 = "Angus2"
/2 = "Benson2"
/3 = "Jenkins2"
/4 = "Sherman2"
/5 = "Pappas2"
/6 = "Tembo2"
/7 = "Dunlop2"
/8 = "Cleary2"
/9 = "Gant2"
/10 = "Watkins2"
/11 = "Fleming2"
/12 = "Conway2"
/13 = "Matson2"
/14 = "Stevenson2"
/15 = "Farley2"
/16 = "Osullivan2"
</item>

Nothing in your code performs any selection on <text avatar1_round> and <text avatar2_round>, so there is nothing that could change the current item for either.

You can do

<values>
/ roundnumber = 0
</values>

<block example>
/ trials = [1-4 = Round]
</block>

<trial Round>
/ ontrialbegin = [
values.roundnumber+=1;
]
/ stimulustimes = [0=round]
/ trialduration = 5000
</trial>

<item round>
/ 1 = "Trial <%values.roundnumber%> is about to start.

You have been paired with Player <%item.labelplayer1.item(text.avatar1_round.nextindex)%> and Player <%item.labelplayer2.item(text.avatar2_round.nextindex)%> "
</item>

<text Round>
/ position = (50%,50%)
/ items = round
/ size = (60%,10%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</text>

<text avatar1_round>
/ items = labelplayer1
/ fontstyle = ("Arial", 3%, true)
/ position = (29, 30)
</text>

<text avatar2_round>
/ items = labelplayer2
/ fontstyle = ("Arial", 3%, true)
/ position = (71, 30)
</text>

<item labelplayer1>
/1 = "McAdams"
/2 = "Atkinson"
/3 = "Bedward"
/4 = "Cuddy"
/5 = "Pappas"
/6 = "Tembo"
/7 = "Dunlop"
/8 = "Cleary"
/9 = "Gant"
/10 = "Watkins"
/11 = "Fleming"
/12 = "Conway"
/13 = "Matson"
/14 = "Stevenson"
/15 = "Farley"
/16 = "Osullivan"
</item>

<item labelplayer2>
/1 = "Angus2"
/2 = "Benson2"
/3 = "Jenkins2"
/4 = "Sherman2"
/5 = "Pappas2"
/6 = "Tembo2"
/7 = "Dunlop2"
/8 = "Cleary2"
/9 = "Gant2"
/10 = "Watkins2"
/11 = "Fleming2"
/12 = "Conway2"
/13 = "Matson2"
/14 = "Stevenson2"
/15 = "Farley2"
/16 = "Osullivan2"
</item>


to fix that

anabela_c
anabela_c
Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)
Group: Forum Members
Posts: 23, Visits: 75
Dave - 5/25/2021
anabela_c - 5/25/2021
Hi!

I have two set of items (i.e. 'item labelplayer1' and 'item labelplayer2') , I would like to displayed a different pair on each new trial (trial Round), however it keeps repeating the same ones. I guess it's due to the 'currentitem' but I can't find an alternative (e.g. a 'nextitem'). I also tried to set up an /ontrialbegin but as a beginner I didn't manage to do so...

Thanks in advance for your help!!

<trial Round>
/ ontrialbegin = [
values.roundnumber+=1;
]
/ stimulustimes = [0=round]
/ trialduration = 5000
</trial>

<item round>
/ 1 = "Trial <%values.roundnumber%> is about to start.

You have been paired with Player <%text.avatar1_round.currentitem%> and Player <%text.avatar2_round.currentitem%> "
</item>

<text Round>
/ position = (50%,50%)
/ items = round
/ size = (60%,10%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</text>

<text avatar1_round>
/ items = labelplayer1
/ fontstyle = ("Arial", 3%, true)
/ position = (29, 30)
</text>

<text avatar2_round>
/ items = labelplayer2
/ fontstyle = ("Arial", 3%, true)
/ position = (71, 30)
</text>

<item labelplayer1>
/1 = "McAdams"
/2 = "Atkinson"
/3 = "Bedward"
/4 = "Cuddy"
/5 = "Pappas"
/6 = "Tembo"
/7 = "Dunlop"
/8 = "Cleary"
/9 = "Gant"
/10 = "Watkins"
/11 = "Fleming"
/12 = "Conway"
/13 = "Matson"
/14 = "Stevenson"
/15 = "Farley"
/16 = "Osullivan"
</item>

<item labelplayer2>
/1 = "Angus2"
/2 = "Benson2"
/3 = "Jenkins2"
/4 = "Sherman2"
/5 = "Pappas2"
/6 = "Tembo2"
/7 = "Dunlop2"
/8 = "Cleary2"
/9 = "Gant2"
/10 = "Watkins2"
/11 = "Fleming2"
/12 = "Conway2"
/13 = "Matson2"
/14 = "Stevenson2"
/15 = "Farley2"
/16 = "Osullivan2"
</item>

Nothing in your code performs any selection on <text avatar1_round> and <text avatar2_round>, so there is nothing that could change the current item for either.

You can do

<values>
/ roundnumber = 0
</values>

<block example>
/ trials = [1-4 = Round]
</block>

<trial Round>
/ ontrialbegin = [
values.roundnumber+=1;
]
/ stimulustimes = [0=round]
/ trialduration = 5000
</trial>

<item round>
/ 1 = "Trial <%values.roundnumber%> is about to start.

You have been paired with Player <%item.labelplayer1.item(text.avatar1_round.nextindex)%> and Player <%item.labelplayer2.item(text.avatar2_round.nextindex)%> "
</item>

<text Round>
/ position = (50%,50%)
/ items = round
/ size = (60%,10%)
/ vjustify = center
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</text>

<text avatar1_round>
/ items = labelplayer1
/ fontstyle = ("Arial", 3%, true)
/ position = (29, 30)
</text>

<text avatar2_round>
/ items = labelplayer2
/ fontstyle = ("Arial", 3%, true)
/ position = (71, 30)
</text>

<item labelplayer1>
/1 = "McAdams"
/2 = "Atkinson"
/3 = "Bedward"
/4 = "Cuddy"
/5 = "Pappas"
/6 = "Tembo"
/7 = "Dunlop"
/8 = "Cleary"
/9 = "Gant"
/10 = "Watkins"
/11 = "Fleming"
/12 = "Conway"
/13 = "Matson"
/14 = "Stevenson"
/15 = "Farley"
/16 = "Osullivan"
</item>

<item labelplayer2>
/1 = "Angus2"
/2 = "Benson2"
/3 = "Jenkins2"
/4 = "Sherman2"
/5 = "Pappas2"
/6 = "Tembo2"
/7 = "Dunlop2"
/8 = "Cleary2"
/9 = "Gant2"
/10 = "Watkins2"
/11 = "Fleming2"
/12 = "Conway2"
/13 = "Matson2"
/14 = "Stevenson2"
/15 = "Farley2"
/16 = "Osullivan2"
</item>


to fix that

wonderful!! thanks!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search