+xHi,
I have two issues I'm hoping get some help with.
1. I'm trying to modify the DDT Money and Food task so that both blocks run as food. With that being said, how would I delete the money blocks and change these blocks to food blocks?
2. When the user is prompted to choose between 2 foods, how I can I write the code to allow for four choices?
Any insight would be greatly appreciated. Thanks!
Re. #1: There should be no need to delete the money blocks. Simply do not run them by removing them from the <expt> elements' /blocks attributes. Similarly, you can add additional instances of the food blocks there.
Re. #2: Define two additional <picture> elements and adjust all four <picture> elements' /position.
<picture foodapic>
/ items = foodpics
/ select = 1
/ position = (30%, 30%)
</picture>
<picture foodbpic>
/ items = foodpics
/ select = 2
/ position = (70%, 30%)
</picture>
<picture foodcpic>
/ items = foodpics
/ select = 3
/ position = (30%, 70%)
</picture>
<picture fooddpic>
/ items = foodpics
/ select = 4
/ position = (70%, 70%)
</picture>
add two additional items to
<item foodpics>
/1 = "macaroni.jpg"
/2 = "chicken.jpg"
/3 = "broccoli.jpg"
/4 = "hamburger.jpg"</item>
Do the same for the <text> elements serving as captions:
<text foodatxt>
/ items = foodcaptions
/ select = 2
/ position = (30%, 50%)
</text>
<text foodbtxt>
/ items = foodcaptions
/ select = 3
/ position = (70%, 50%)
</text>
<text foodctxt>
/ items = foodcaptions
/ select = 4
/ position = (30%, 90%)
</text>
<text fooddtxt>
/ items = foodcaptions
/ select = 5
/ position = (70%, 90%)
</text>
Adjust the the position of
<text foodcaption>
/ items = foodcaptions
/ select = 1
/ position = (50%, 10%)
</text>
as well.
Have the foodchoice trial display the newly added objects and add them to its response options and conditional logic:
<trial foodchoice>
/ stimulusframes = [1=foodcaption, foodapic, foodbpic,
foodcpic, fooddpic, foodatxt, foodbtxt,
foodctxt, fooddtxt]
/ validresponse = (foodapic, foodbpic,
foodcpic, fooddpic)
/ ontrialend = [if(trial.foodchoice.response=="foodapic")values.foodchoice=1]
/ ontrialend = [if(trial.foodchoice.response=="foodbpic")values.foodchoice=2]
/ ontrialend = [if(trial.foodchoice.response=="foodcpic")values.foodchoice=3]
/ ontrialend = [if(trial.foodchoice.response=="fooddpic")values.foodchoice=4]</trial>
Some additional adjustments along the same lines need to be made to <item objectpicitems>, <item objectdescriptions>. You'll find all of that in the attached script.