Displaying Sets of Stimuli for Participants to Select/Combine


Author
Message
ashleym
ashleym
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 25, Visits: 90
Hi there,

I am trying to design a task where participants will view different sets of images and messages and create combinations of them. I have been searching around the messages boards and I have come across different threads that are close or have elements of what I am looking for, but I have yet to be able to figure out exactly how to create this task. I am not an Inquisit expert, so I wonder if someone can just help me get started.

The task should proceed as follows:
1a. On screen, four randomly selected images appear in a square-like grid. Each image (.jpg files) belongs to one of four categories ("RM", "RL", "UM", "UL") that include 10 images each. For any given trial, one randomly selected image should appear on screen from each of the four categories.
1b. Participants will select one image (ideally this mouse input could be recorded as their response).

2a. On the next screen, two randomly selected messages appear next to each other (.png files). Each message belongs to one of two categories ("MAX", "MIN") that include 10 messages each. For any given trial, one randomly selected message should appear on screen from each of the two categories.
2b. Participants will select one message (ideally the mouse input would be recorded as their response).

3. On a third screen, participants' selection of the image (e.g., "RM01") and message (e.g., "MAX15") will both appear on screen simultaneously, essentially to show participants the combination that they created. 

The subsequent block would look identical, with four new (noreplace) images and two new (noreplace) messages followed by showing participants their selected combination, and this would go on until participants had worked through all of the image and message stimuli.


I am having trouble putting all of this together such that the images and messages are pulled from the different categories and displayed in different places each time (I think I need multiple picture elements to set this up), and I am not sure whether it is possible to use participants' mouse-click selections to record their data (I need to know the image number and message number they select).

I know this is a lot to ask, but if anyone could point me in the direction of threads that sound similar or provide any initial information to get this script started, it would be greatly appreciated.

Thank you in advance!
Ashley
Dave
Dave
Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)
Group: Administrators
Posts: 10K, Visits: 62K
ashleym - 10/22/2020
Hi there,

I am trying to design a task where participants will view different sets of images and messages and create combinations of them. I have been searching around the messages boards and I have come across different threads that are close or have elements of what I am looking for, but I have yet to be able to figure out exactly how to create this task. I am not an Inquisit expert, so I wonder if someone can just help me get started.

The task should proceed as follows:
1a. On screen, four randomly selected images appear in a square-like grid. Each image (.jpg files) belongs to one of four categories ("RM", "RL", "UM", "UL") that include 10 images each. For any given trial, one randomly selected image should appear on screen from each of the four categories.
1b. Participants will select one image (ideally this mouse input could be recorded as their response).

2a. On the next screen, two randomly selected messages appear next to each other (.png files). Each message belongs to one of two categories ("MAX", "MIN") that include 10 messages each. For any given trial, one randomly selected message should appear on screen from each of the two categories.
2b. Participants will select one message (ideally the mouse input would be recorded as their response).

3. On a third screen, participants' selection of the image (e.g., "RM01") and message (e.g., "MAX15") will both appear on screen simultaneously, essentially to show participants the combination that they created. 

The subsequent block would look identical, with four new (noreplace) images and two new (noreplace) messages followed by showing participants their selected combination, and this would go on until participants had worked through all of the image and message stimuli.


I am having trouble putting all of this together such that the images and messages are pulled from the different categories and displayed in different places each time (I think I need multiple picture elements to set this up), and I am not sure whether it is possible to use participants' mouse-click selections to record their data (I need to know the image number and message number they select).

I know this is a lot to ask, but if anyone could point me in the direction of threads that sound similar or provide any initial information to get this script started, it would be greatly appreciated.

Thank you in advance!
Ashley

You need four <picture> elements -- RM, RL, UM, UL -- with 10 items each. They can be assigned random posititions /ontrialbegin. The same is true for the two "random messages" -- here you need two picture elements, again their positions (left, right) can easily be randomized /ontrialbegin. In a nutshell, using <text> elements (it works the same with <picture>):

<values>
/ RL_x = 0%
/ RL_y = 0%
/ RM_x = 0%
/ RM_y = 0%
/ UL_x = 0%
/ UL_y = 0%
/ UM_x = 0%
/ UM_y = 0%
/ selectedcategory = ""
/ selectedcategoryitem = 0

/ MAX_x = 0%
/ MIN_x = 0%
/ selectedmessage = ""
/ selectedmessageitem = 0
</values>

// grid positions for part 1
<list grid_x>
/ items = (30%,70%,30%,70%)
/ selectionrate = always
</list>

<list grid_y>
/ items = (25%,25%,75%,75%)
/ selectionrate = always
/ selectionmode = list.grid_x.currentindex
</list>

// left / right positions for part 2
<list left_right>
/ items = (25%, 75%)
/ selectionrate = always
</list>

<block example>
/ trials = [1-10 = sequence(a,b,c)]
</block>

<trial a>
/ ontrialbegin = [
    values.RL_x = list.grid_x.nextvalue;
    values.RL_y = list.grid_y.nextvalue;
    values.RM_x = list.grid_x.nextvalue;
    values.RM_y = list.grid_y.nextvalue;
    values.UL_x = list.grid_x.nextvalue;
    values.UL_y = list.grid_y.nextvalue;
    values.UM_x = list.grid_x.nextvalue;
    values.UM_y = list.grid_y.nextvalue;
]
/ stimulusframes = [1=RL,RM,UL,UM]
/ inputdevice = mouse
/ validresponse = (RL,RM,UL,UM)
/ ontrialend = [
    values.selectedcategory = trial.a.response;
    if (values.selectedcategory == "RL"){
        values.selectedcategoryitem = text.RL.currentitemnumber;
    } else if (values.selectedcategory == "RM"){
        values.selectedcategoryitem = text.RM.currentitemnumber;
    } else if (values.selectedcategory == "UL"){
        values.selectedcategoryitem = text.UL.currentitemnumber;
    } else if (values.selectedcategory == "UM"){
        values.selectedcategoryitem = text.UM.currentitemnumber;
    };
]
</trial>

<trial b>
/ ontrialbegin = [
    values.MAX_x = list.left_right.nextvalue;
    values.MIN_x = list.left_right.nextvalue;
]
/ stimulusframes = [1=MAX,MIN]
/ inputdevice = mouse
/ validresponse = (MAX,MIN)
/ ontrialend = [
    values.selectedmessage = trial.b.response;
    if (values.selectedmessage == "MAX"){
        values.selectedmessageitem = text.MAX.currentitemnumber;
    } else if (values.selectedmessage == "MIN"){
        values.selectedmessageitem = text.MIN.currentitemnumber;
    };
]
</trial>

<trial c>
/ ontrialbegin = [
    if (values.selectedcategory == "RL"){
        text.category.item.1 = item.RL_items.item(values.selectedcategoryitem);
    } else if (values.selectedcategory == "RM"){
        text.category.item.1 = item.RM_items.item(values.selectedcategoryitem);
    } else if (values.selectedcategory == "UL"){
        text.category.item.1 = item.UL_items.item(values.selectedcategoryitem);
    } else if (values.selectedcategory == "UM"){
        text.category.item.1 = item.UM_items.item(values.selectedcategoryitem);
    };
    if (values.selectedmessage == "MAX") {
        text.message.item.1 = item.MAX_items.item(values.selectedmessageitem);
    } else if (values.selectedmessage == "MIN") {
        text.message.item.1 = item.MIN_items.item(values.selectedmessageitem);
    };
]
/ stimulusframes = [1=category, message]
/ inputdevice = mouse
/ validresponse = (lbuttondown)
</trial>

<text category>
/ items = ("BLANK")
/ position = (50%, 30%)
</text>

<text message>
/ items = ("BLANK")
/ position = (50%, 70%)
</text>

<text RL>
/ items = RL_items
/ hposition = values.RL_x
/ vposition = values.RL_y
</text>

<text RM>
/ items = RM_items
/ hposition = values.RM_x
/ vposition = values.RM_y
</text>

<text UL>
/ items = UL_items
/ hposition = values.UL_x
/ vposition = values.UL_y
</text>

<text UM>
/ items = UM_items
/ hposition = values.UM_x
/ vposition = values.UM_y
</text>

<item RL_items>
/ 1 = "RL_01"
/ 2 = "RL_02"
/ 3 = "RL_03"
/ 4 = "RL_04"
/ 5 = "RL_05"
/ 6 = "RL_06"
/ 7 = "RL_07"
/ 8 = "RL_08"
/ 9 = "RL_09"
/ 10 = "RL_10"
</item>

<item RM_items>
/ 1 = "RM_01"
/ 2 = "RM_02"
/ 3 = "RM_03"
/ 4 = "RM_04"
/ 5 = "RM_05"
/ 6 = "RM_06"
/ 7 = "RM_07"
/ 8 = "RM_08"
/ 9 = "RM_09"
/ 10 = "RM_10"
</item>

<item UL_items>
/ 1 = "UL_01"
/ 2 = "UL_02"
/ 3 = "UL_03"
/ 4 = "UL_04"
/ 5 = "UL_05"
/ 6 = "UL_06"
/ 7 = "UL_07"
/ 8 = "UL_08"
/ 9 = "UL_09"
/ 10 = "UL_10"
</item>

<item UM_items>
/ 1 = "UM_01"
/ 2 = "UM_02"
/ 3 = "UM_03"
/ 4 = "UM_04"
/ 5 = "UM_05"
/ 6 = "UM_06"
/ 7 = "UM_07"
/ 8 = "UM_08"
/ 9 = "UM_09"
/ 10 = "UM_10"
</item>

<text MAX>
/ items = MAX_items
/ hposition = values.MAX_x
/ vposition = 50%
</text>

<text MIN>
/ items = MIN_items
/ hposition = values.MIN_x
/ vposition = 50%
</text>

<item MAX_items>
/ 1 = "MAX_01"
/ 2 = "MAX_02"
/ 3 = "MAX_03"
/ 4 = "MAX_04"
/ 5 = "MAX_05"
/ 6 = "MAX_06"
/ 7 = "MAX_07"
/ 8 = "MAX_08"
/ 9 = "MAX_09"
/ 10 = "MAX_10"
</item>

<item MIN_items>
/ 1 = "MIN_01"
/ 2 = "MIN_02"
/ 3 = "MIN_03"
/ 4 = "MIN_04"
/ 5 = "MIN_05"
/ 6 = "MIN_06"
/ 7 = "MIN_07"
/ 8 = "MIN_08"
/ 9 = "MIN_09"
/ 10 = "MIN_10"
</item>

ashleym
ashleym
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 25, Visits: 90

This is INCREDIBLE, thanks Dave. (Almost) Everything works perfectly! I am having issues with trial c and I am 100% sure it is just because I do not fully understand something...I am sure this is an easy fix somehow.

In the code related to trial c (i.e., the category and message elements), if I replace text with picture, it does not work obviously because I do not have items/pictures called "BLANK." If I leave the code as is, what displays in trial c are the names for the pictures (e.g., "MAX_15" and "RM_08"). Would you mind helping me a bit more here to figure out how to display the actual pictures associated with the items selected by participants? I am not clearly understanding the "Blank" piece, I think, otherwise I could probably figure it out.

Sorry for what I imagine is a silly question! Thanks again.

Dave
Dave
Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)
Group: Administrators
Posts: 10K, Visits: 62K
ashleym - 10/22/2020

This is INCREDIBLE, thanks Dave. (Almost) Everything works perfectly! I am having issues with trial c and I am 100% sure it is just because I do not fully understand something...I am sure this is an easy fix somehow.

In the code related to trial c (i.e., the category and message elements), if I replace text with picture, it does not work obviously because I do not have items/pictures called "BLANK." If I leave the code as is, what displays in trial c are the names for the pictures (e.g., "MAX_15" and "RM_08"). Would you mind helping me a bit more here to figure out how to display the actual pictures associated with the items selected by participants? I am not clearly understanding the "Blank" piece, I think, otherwise I could probably figure it out.

Sorry for what I imagine is a silly question! Thanks again.

Just put in any picture file you have available in

<picture category>
/ items = ("someimageyouhaveavailable.jpg")
/ position = (50%, 30%)
</picture>

and same for <picture message>. It's just a placeholder that will be replaced with the participant's selections later.

ashleym
ashleym
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 25, Visits: 90
Dave - 10/22/2020
ashleym - 10/22/2020

This is INCREDIBLE, thanks Dave. (Almost) Everything works perfectly! I am having issues with trial c and I am 100% sure it is just because I do not fully understand something...I am sure this is an easy fix somehow.

In the code related to trial c (i.e., the category and message elements), if I replace text with picture, it does not work obviously because I do not have items/pictures called "BLANK." If I leave the code as is, what displays in trial c are the names for the pictures (e.g., "MAX_15" and "RM_08"). Would you mind helping me a bit more here to figure out how to display the actual pictures associated with the items selected by participants? I am not clearly understanding the "Blank" piece, I think, otherwise I could probably figure it out.

Sorry for what I imagine is a silly question! Thanks again.

Just put in any picture file you have available in

<picture category>
/ items = ("someimageyouhaveavailable.jpg")
/ position = (50%, 30%)
</picture>

and same for <picture message>. It's just a placeholder that will be replaced with the participant's selections later.

THANK YOU! It works perfectly. I really appreciate it!

Take care.
ashleym
ashleym
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 25, Visits: 90
Hi! I hope all is well. I am here with a follow-up question about this task :)

Some of the images and some of the messages I am using are vertical versus horizontal and I am wondering if there is a simple enough way to link the item lists of the various stimuli so that in Trial c, where participants view their created combinations of images and messages, they could be linked such that if participants selected a vertical image, the vertical version of the message would be displayed on top of it in Trial c (I have vertical versions and horizontal versions created for all message overlays).

Example Block:
Trial a: Participant views images RM01, RL14, UM22, UL39
Trial b: Participant views messages MAX19, MIN28
Trial c: Participant sees the horizontal version of message MIN28 overlaid on the image *because* they chose image UM22 (which happens to be horizontal) VERSUS participant sees the vertical version of message MIN28 overlaid because they chose image RM01 (which is vertical).

I am thinking this might be pretty complicated, but if there is somewhere I can be directed to help me figure it out, that would be amazing! Please let me know if this isn't exactly clear.
Thank you in advance for any help!!!
Ashley

Dave
Dave
Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)
Group: Administrators
Posts: 10K, Visits: 62K
ashleym - 11/21/2020
Hi! I hope all is well. I am here with a follow-up question about this task :)

Some of the images and some of the messages I am using are vertical versus horizontal and I am wondering if there is a simple enough way to link the item lists of the various stimuli so that in Trial c, where participants view their created combinations of images and messages, they could be linked such that if participants selected a vertical image, the vertical version of the message would be displayed on top of it in Trial c (I have vertical versions and horizontal versions created for all message overlays).

Example Block:
Trial a: Participant views images RM01, RL14, UM22, UL39
Trial b: Participant views messages MAX19, MIN28
Trial c: Participant sees the horizontal version of message MIN28 overlaid on the image *because* they chose image UM22 (which happens to be horizontal) VERSUS participant sees the vertical version of message MIN28 overlaid because they chose image RM01 (which is vertical).

I am thinking this might be pretty complicated, but if there is somewhere I can be directed to help me figure it out, that would be amazing! Please let me know if this isn't exactly clear.
Thank you in advance for any help!!!
Ashley

I cannot possibly answer this without the full code as well as all images, etc, the script requires to run.
ashleym
ashleym
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 25, Visits: 90
Dave - 11/23/2020
ashleym - 11/21/2020
Hi! I hope all is well. I am here with a follow-up question about this task :)

Some of the images and some of the messages I am using are vertical versus horizontal and I am wondering if there is a simple enough way to link the item lists of the various stimuli so that in Trial c, where participants view their created combinations of images and messages, they could be linked such that if participants selected a vertical image, the vertical version of the message would be displayed on top of it in Trial c (I have vertical versions and horizontal versions created for all message overlays).

Example Block:
Trial a: Participant views images RM01, RL14, UM22, UL39
Trial b: Participant views messages MAX19, MIN28
Trial c: Participant sees the horizontal version of message MIN28 overlaid on the image *because* they chose image UM22 (which happens to be horizontal) VERSUS participant sees the vertical version of message MIN28 overlaid because they chose image RM01 (which is vertical).

I am thinking this might be pretty complicated, but if there is somewhere I can be directed to help me figure it out, that would be amazing! Please let me know if this isn't exactly clear.
Thank you in advance for any help!!!
Ashley

I cannot possibly answer this without the full code as well as all images, etc, the script requires to run.

I'm sorry about that! I didn't realize. I will organize and post the code and stimuli later.

I do have another (quick?) question though, if it is something that can be answered easily/without code.

I changed the script a bit so that two of the image categories are showing on one page (instead of all four) and so that presentation of the two image trials are randomized. I did this using lists and a master list, and all of that works great. One thing I cannot figure out how to do is to randomize the presentation order of the image and message trials (we decided we don't want the trials a,b,c to always go in that sequence - c always needs to come last, but a/a2 and b should be presented randomly.

Below is the relevant section of the code. I need list.triala (which is inclusive of trials a and a2, randomized) and list.trialb to be presented randomly, so that participants don't always see the images before the messages. I tried creating another master list and then randomizing those lists within the block, but that didn't work so I'm not even sure if that is something that can be done.

Any suggestions or help would be great, thank you!! Also, thank you again so much for the help with this earlier, everything else is working perfectly!! :)

Ashley

------------------------------------------------------------
<block creativetask>
/ trials = [1=generalinstructions; 2-81=list.master; 82 = endtask;]
</block>

<list master>
/ items = (surveypage.nextcombo, list.triala.nextvalue, list.trialb.nextvalue, list.trialc.nextvalue)
/ selectionmode = sequence
</list>

<list triala>
/ items = (trial.a,trial.a2)
/ selectionmode = random
</list>

<list trialb>
/ items = (trial.b)
</list>

<list trialc>
/ items = (trial.c)
</list>

<trial a>
/ ontrialbegin = [
  values.RL_x = list.left_right.nextvalue;
  values.UL_x = list.left_right.nextvalue;
]
/ stimulustimes = [0=RL,UL,imageinstruction]
/ inputdevice = mouse
/ validresponse = (RL,UL)
/ ontrialend = [
  values.selectedcategory = trial.a.response;
  if (values.selectedcategory == "RL"){
   values.selectedcategoryitem = picture.RL.currentitemnumber;
  } else if (values.selectedcategory == "UL"){
   values.selectedcategoryitem = picture.UL.currentitemnumber;
  };
]
</trial>

<trial a2>
/ ontrialbegin = [
  values.RM_x = list.left_right.nextvalue;
  values.UM_x = list.left_right.nextvalue;
]
/ stimulustimes = [0==RM,UM,imageinstruction]
/ inputdevice = mouse
/ validresponse = (RM,UM)
/ ontrialend = [
  values.selectedcategory = trial.a2.response;
  if (values.selectedcategory == "RM"){
   values.selectedcategoryitem = picture.RM.currentitemnumber;
  } else if (values.selectedcategory == "UM"){
   values.selectedcategoryitem = picture.UM.currentitemnumber;
  };
]
</trial>

<trial b>
/ ontrialbegin = [
  values.MAX_x = list.left_right.nextvalue;
  values.MIN_x = list.left_right.nextvalue;
]
/ stimulustimes = [0=background1,background2,messageinstruction,MAX,MIN]
/ inputdevice = mouse
/ validresponse = (MAX,MIN)
/ ontrialend = [
  values.selectedmessage = trial.b.response;
  if (values.selectedmessage == "MAX"){
   values.selectedmessageitem = picture.MAX.currentitemnumber;
  } else if (values.selectedmessage == "MIN"){
   values.selectedmessageitem = picture.MIN.currentitemnumber;
  };
]
</trial>

<trial c>
/ ontrialbegin = [
  if (values.selectedcategory == "RL"){
   picture.category.item.1 = item.RL_items.item(values.selectedcategoryitem);
  } else if (values.selectedcategory == "RM"){
   picture.category.item.1 = item.RM_items.item(values.selectedcategoryitem);
  } else if (values.selectedcategory == "UL"){
   picture.category.item.1 = item.UL_items.item(values.selectedcategoryitem);
  } else if (values.selectedcategory == "UM"){
   picture.category.item.1 = item.UM_items.item(values.selectedcategoryitem);
  };
  if (values.selectedmessage == "MAX") {
   picture.message.item.1 = item.MAX_items.item(values.selectedmessageitem);
  } else if (values.selectedmessage == "MIN") {
   picture.message.item.1 = item.MIN_items.item(values.selectedmessageitem);
  };
]
/ stimulustimes = [0=background, category, message, comboinstruction]
/ inputdevice = mouse
/ validresponse = (lbuttondown)
</trial>
Dave
Dave
Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)Supreme Being (871K reputation)
Group: Administrators
Posts: 10K, Visits: 62K
ashleym - 11/23/2020
Dave - 11/23/2020
ashleym - 11/21/2020
Hi! I hope all is well. I am here with a follow-up question about this task :)

Some of the images and some of the messages I am using are vertical versus horizontal and I am wondering if there is a simple enough way to link the item lists of the various stimuli so that in Trial c, where participants view their created combinations of images and messages, they could be linked such that if participants selected a vertical image, the vertical version of the message would be displayed on top of it in Trial c (I have vertical versions and horizontal versions created for all message overlays).

Example Block:
Trial a: Participant views images RM01, RL14, UM22, UL39
Trial b: Participant views messages MAX19, MIN28
Trial c: Participant sees the horizontal version of message MIN28 overlaid on the image *because* they chose image UM22 (which happens to be horizontal) VERSUS participant sees the vertical version of message MIN28 overlaid because they chose image RM01 (which is vertical).

I am thinking this might be pretty complicated, but if there is somewhere I can be directed to help me figure it out, that would be amazing! Please let me know if this isn't exactly clear.
Thank you in advance for any help!!!
Ashley

I cannot possibly answer this without the full code as well as all images, etc, the script requires to run.

I'm sorry about that! I didn't realize. I will organize and post the code and stimuli later.

I do have another (quick?) question though, if it is something that can be answered easily/without code.

I changed the script a bit so that two of the image categories are showing on one page (instead of all four) and so that presentation of the two image trials are randomized. I did this using lists and a master list, and all of that works great. One thing I cannot figure out how to do is to randomize the presentation order of the image and message trials (we decided we don't want the trials a,b,c to always go in that sequence - c always needs to come last, but a/a2 and b should be presented randomly.

Below is the relevant section of the code. I need list.triala (which is inclusive of trials a and a2, randomized) and list.trialb to be presented randomly, so that participants don't always see the images before the messages. I tried creating another master list and then randomizing those lists within the block, but that didn't work so I'm not even sure if that is something that can be done.

Any suggestions or help would be great, thank you!! Also, thank you again so much for the help with this earlier, everything else is working perfectly!! :)

Ashley

------------------------------------------------------------
<block creativetask>
/ trials = [1=generalinstructions; 2-81=list.master; 82 = endtask;]
</block>

<list master>
/ items = (surveypage.nextcombo, list.triala.nextvalue, list.trialb.nextvalue, list.trialc.nextvalue)
/ selectionmode = sequence
</list>

<list triala>
/ items = (trial.a,trial.a2)
/ selectionmode = random
</list>

<list trialb>
/ items = (trial.b)
</list>

<list trialc>
/ items = (trial.c)
</list>

<trial a>
/ ontrialbegin = [
  values.RL_x = list.left_right.nextvalue;
  values.UL_x = list.left_right.nextvalue;
]
/ stimulustimes = [0=RL,UL,imageinstruction]
/ inputdevice = mouse
/ validresponse = (RL,UL)
/ ontrialend = [
  values.selectedcategory = trial.a.response;
  if (values.selectedcategory == "RL"){
   values.selectedcategoryitem = picture.RL.currentitemnumber;
  } else if (values.selectedcategory == "UL"){
   values.selectedcategoryitem = picture.UL.currentitemnumber;
  };
]
</trial>

<trial a2>
/ ontrialbegin = [
  values.RM_x = list.left_right.nextvalue;
  values.UM_x = list.left_right.nextvalue;
]
/ stimulustimes = [0==RM,UM,imageinstruction]
/ inputdevice = mouse
/ validresponse = (RM,UM)
/ ontrialend = [
  values.selectedcategory = trial.a2.response;
  if (values.selectedcategory == "RM"){
   values.selectedcategoryitem = picture.RM.currentitemnumber;
  } else if (values.selectedcategory == "UM"){
   values.selectedcategoryitem = picture.UM.currentitemnumber;
  };
]
</trial>

<trial b>
/ ontrialbegin = [
  values.MAX_x = list.left_right.nextvalue;
  values.MIN_x = list.left_right.nextvalue;
]
/ stimulustimes = [0=background1,background2,messageinstruction,MAX,MIN]
/ inputdevice = mouse
/ validresponse = (MAX,MIN)
/ ontrialend = [
  values.selectedmessage = trial.b.response;
  if (values.selectedmessage == "MAX"){
   values.selectedmessageitem = picture.MAX.currentitemnumber;
  } else if (values.selectedmessage == "MIN"){
   values.selectedmessageitem = picture.MIN.currentitemnumber;
  };
]
</trial>

<trial c>
/ ontrialbegin = [
  if (values.selectedcategory == "RL"){
   picture.category.item.1 = item.RL_items.item(values.selectedcategoryitem);
  } else if (values.selectedcategory == "RM"){
   picture.category.item.1 = item.RM_items.item(values.selectedcategoryitem);
  } else if (values.selectedcategory == "UL"){
   picture.category.item.1 = item.UL_items.item(values.selectedcategoryitem);
  } else if (values.selectedcategory == "UM"){
   picture.category.item.1 = item.UM_items.item(values.selectedcategoryitem);
  };
  if (values.selectedmessage == "MAX") {
   picture.message.item.1 = item.MAX_items.item(values.selectedmessageitem);
  } else if (values.selectedmessage == "MIN") {
   picture.message.item.1 = item.MIN_items.item(values.selectedmessageitem);
  };
]
/ stimulustimes = [0=background, category, message, comboinstruction]
/ inputdevice = mouse
/ validresponse = (lbuttondown)
</trial>

I would prefer answering that when I have something to actually work with, i.e. the full script and all necessary files, but in a nutshell, it goes like this:

<block example>
/ trials = [1-80=list.master;]
</block>

<list master>
/ items = (surveypage.nextcombo, list.a_b_order_randomizer.nextvalue, list.a_b_order_randomizer.nextvalue, trial.c)
/ selectionmode = sequence
</list>

<list a_b_order_randomizer>
/ items = (list.triala.nextvalue, list.trialb.nextvalue)
/ selectionrate = always
</list>

<list triala>
/ items = (trial.a,trial.a2)
</list>

<list trialb>
/ items = (trial.b)
</list>

<surveypage nextcombo>
/ caption = "nextcombo"
</surveypage>

<trial a>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<trial a2>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<trial b>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<trial c>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("<%script.currenttrial%>")
</text>


Edited 3 days ago @ 9:36 AM by Dave
ashleym
ashleym
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 25, Visits: 90
Dave - 11/23/2020
ashleym - 11/23/2020
Dave - 11/23/2020
ashleym - 11/21/2020
Hi! I hope all is well. I am here with a follow-up question about this task :)

Some of the images and some of the messages I am using are vertical versus horizontal and I am wondering if there is a simple enough way to link the item lists of the various stimuli so that in Trial c, where participants view their created combinations of images and messages, they could be linked such that if participants selected a vertical image, the vertical version of the message would be displayed on top of it in Trial c (I have vertical versions and horizontal versions created for all message overlays).

Example Block:
Trial a: Participant views images RM01, RL14, UM22, UL39
Trial b: Participant views messages MAX19, MIN28
Trial c: Participant sees the horizontal version of message MIN28 overlaid on the image *because* they chose image UM22 (which happens to be horizontal) VERSUS participant sees the vertical version of message MIN28 overlaid because they chose image RM01 (which is vertical).

I am thinking this might be pretty complicated, but if there is somewhere I can be directed to help me figure it out, that would be amazing! Please let me know if this isn't exactly clear.
Thank you in advance for any help!!!
Ashley

I cannot possibly answer this without the full code as well as all images, etc, the script requires to run.

I'm sorry about that! I didn't realize. I will organize and post the code and stimuli later.

I do have another (quick?) question though, if it is something that can be answered easily/without code.

I changed the script a bit so that two of the image categories are showing on one page (instead of all four) and so that presentation of the two image trials are randomized. I did this using lists and a master list, and all of that works great. One thing I cannot figure out how to do is to randomize the presentation order of the image and message trials (we decided we don't want the trials a,b,c to always go in that sequence - c always needs to come last, but a/a2 and b should be presented randomly.

Below is the relevant section of the code. I need list.triala (which is inclusive of trials a and a2, randomized) and list.trialb to be presented randomly, so that participants don't always see the images before the messages. I tried creating another master list and then randomizing those lists within the block, but that didn't work so I'm not even sure if that is something that can be done.

Any suggestions or help would be great, thank you!! Also, thank you again so much for the help with this earlier, everything else is working perfectly!! :)

Ashley

------------------------------------------------------------
<block creativetask>
/ trials = [1=generalinstructions; 2-81=list.master; 82 = endtask;]
</block>

<list master>
/ items = (surveypage.nextcombo, list.triala.nextvalue, list.trialb.nextvalue, list.trialc.nextvalue)
/ selectionmode = sequence
</list>

<list triala>
/ items = (trial.a,trial.a2)
/ selectionmode = random
</list>

<list trialb>
/ items = (trial.b)
</list>

<list trialc>
/ items = (trial.c)
</list>

<trial a>
/ ontrialbegin = [
  values.RL_x = list.left_right.nextvalue;
  values.UL_x = list.left_right.nextvalue;
]
/ stimulustimes = [0=RL,UL,imageinstruction]
/ inputdevice = mouse
/ validresponse = (RL,UL)
/ ontrialend = [
  values.selectedcategory = trial.a.response;
  if (values.selectedcategory == "RL"){
   values.selectedcategoryitem = picture.RL.currentitemnumber;
  } else if (values.selectedcategory == "UL"){
   values.selectedcategoryitem = picture.UL.currentitemnumber;
  };
]
</trial>

<trial a2>
/ ontrialbegin = [
  values.RM_x = list.left_right.nextvalue;
  values.UM_x = list.left_right.nextvalue;
]
/ stimulustimes = [0==RM,UM,imageinstruction]
/ inputdevice = mouse
/ validresponse = (RM,UM)
/ ontrialend = [
  values.selectedcategory = trial.a2.response;
  if (values.selectedcategory == "RM"){
   values.selectedcategoryitem = picture.RM.currentitemnumber;
  } else if (values.selectedcategory == "UM"){
   values.selectedcategoryitem = picture.UM.currentitemnumber;
  };
]
</trial>

<trial b>
/ ontrialbegin = [
  values.MAX_x = list.left_right.nextvalue;
  values.MIN_x = list.left_right.nextvalue;
]
/ stimulustimes = [0=background1,background2,messageinstruction,MAX,MIN]
/ inputdevice = mouse
/ validresponse = (MAX,MIN)
/ ontrialend = [
  values.selectedmessage = trial.b.response;
  if (values.selectedmessage == "MAX"){
   values.selectedmessageitem = picture.MAX.currentitemnumber;
  } else if (values.selectedmessage == "MIN"){
   values.selectedmessageitem = picture.MIN.currentitemnumber;
  };
]
</trial>

<trial c>
/ ontrialbegin = [
  if (values.selectedcategory == "RL"){
   picture.category.item.1 = item.RL_items.item(values.selectedcategoryitem);
  } else if (values.selectedcategory == "RM"){
   picture.category.item.1 = item.RM_items.item(values.selectedcategoryitem);
  } else if (values.selectedcategory == "UL"){
   picture.category.item.1 = item.UL_items.item(values.selectedcategoryitem);
  } else if (values.selectedcategory == "UM"){
   picture.category.item.1 = item.UM_items.item(values.selectedcategoryitem);
  };
  if (values.selectedmessage == "MAX") {
   picture.message.item.1 = item.MAX_items.item(values.selectedmessageitem);
  } else if (values.selectedmessage == "MIN") {
   picture.message.item.1 = item.MIN_items.item(values.selectedmessageitem);
  };
]
/ stimulustimes = [0=background, category, message, comboinstruction]
/ inputdevice = mouse
/ validresponse = (lbuttondown)
</trial>

I would prefer answering that when I have something to actually work with, i.e. the full script and all necessary files.

OK, sorry about that. I've attached the working script and necessary files in a .zip file.

Please let me know if you need anything else.

Thanks so much,
Ashley
Attachments
CreationTask.zip (3 views, 2.00 MB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search