cehall
|
|
Group: Forum Members
Posts: 6,
Visits: 22
|
Hello,
I was wondering if anyone knew if it was possible to make a trial/series of trials of dragdrops, such that the previous choice stays on the screen which the participant makes the rest of their selections?
The task I am trying to create is a simple resource distribution task where the participants must divide 6 markers between two baskets. The six markers (dropsources) will appear in a central basket (as part of the background image) and must be each be dragged into either the green or orange basket (droptargets). I want the previous the choices to stay on the screen until all 6 markers are sorted. I need the data to record how many markers were placed into each basket.
Here's the code I have so far:
<picture background> / items = ("background.jpeg") </picture>
<picture green_basket> / items = ("green_basket.jpeg") / droptarget = true / position = (80%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture orange_basket> / items = ("orange_basket.jpeg") / droptarget = true / position = (20%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker1> / items = ("marker1.jpeg") / dropsource = true / position = (45%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker2> / items = ("marker2.jpeg") / dropsource = true / position = (47%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker3> / items = ("marker3.jpeg") / dropsource = true / position = (49%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker4> / items = ("marker4.jpeg") / dropsource = true / position = (51%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker5> / items = ("marker5.jpeg") / dropsource = true / position = (53%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker6> / items = ("marker6.jpeg") / dropsource = true / position = (55%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<trial resource> / dropsources = (marker1, marker2, marker3, marker4, marker5, marker6) / droptargets = (orange_basket, green_basket) / stimulusframes = [1=background, marker1, marker2, marker3, marker4, marker5, marker6, orange_basket, green_basket] / showmousecursor = true / inputdevice = dragdrop / validresponse = (orange_basket, green_basket) / correctresponse = ("orange_basket") </trial>
Many thanks!!
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+xHello, I was wondering if anyone knew if it was possible to make a trial/series of trials of dragdrops, such that the previous choice stays on the screen which the participant makes the rest of their selections? The task I am trying to create is a simple resource distribution task where the participants must divide 6 markers between two baskets. The six markers (dropsources) will appear in a central basket (as part of the background image) and must be each be dragged into either the green or orange basket (droptargets). I want the previous the choices to stay on the screen until all 6 markers are sorted. I need the data to record how many markers were placed into each basket. Here's the code I have so far: <picture background> / items = ("background.jpeg") </picture> <picture green_basket> / items = ("green_basket.jpeg") / droptarget = true / position = (80%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture orange_basket> / items = ("orange_basket.jpeg") / droptarget = true / position = (20%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker1> / items = ("marker1.jpeg") / dropsource = true / position = (45%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker2> / items = ("marker2.jpeg") / dropsource = true / position = (47%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker3> / items = ("marker3.jpeg") / dropsource = true / position = (49%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker4> / items = ("marker4.jpeg") / dropsource = true / position = (51%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker5> / items = ("marker5.jpeg") / dropsource = true / position = (53%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker6> / items = ("marker6.jpeg") / dropsource = true / position = (55%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <trial resource> / dropsources = (marker1, marker2, marker3, marker4, marker5, marker6) / droptargets = (orange_basket, green_basket) / stimulusframes = [1=background, marker1, marker2, marker3, marker4, marker5, marker6, orange_basket, green_basket] / showmousecursor = true / inputdevice = dragdrop / validresponse = (orange_basket, green_basket) / correctresponse = ("orange_basket") </trial> Many thanks!! That's entirely possible and you can find plenty of examples in the library (e.g. the Tower of London) or via search in the forums (search for "dragdrop"), e.g, the procedure discussed in https://forums.millisecond.com/Topic29302.aspx and https://forums.millisecond.com/Topic29339.aspx .
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+x+xHello, I was wondering if anyone knew if it was possible to make a trial/series of trials of dragdrops, such that the previous choice stays on the screen which the participant makes the rest of their selections? The task I am trying to create is a simple resource distribution task where the participants must divide 6 markers between two baskets. The six markers (dropsources) will appear in a central basket (as part of the background image) and must be each be dragged into either the green or orange basket (droptargets). I want the previous the choices to stay on the screen until all 6 markers are sorted. I need the data to record how many markers were placed into each basket. Here's the code I have so far: <picture background> / items = ("background.jpeg") </picture> <picture green_basket> / items = ("green_basket.jpeg") / droptarget = true / position = (80%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture orange_basket> / items = ("orange_basket.jpeg") / droptarget = true / position = (20%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker1> / items = ("marker1.jpeg") / dropsource = true / position = (45%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker2> / items = ("marker2.jpeg") / dropsource = true / position = (47%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker3> / items = ("marker3.jpeg") / dropsource = true / position = (49%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker4> / items = ("marker4.jpeg") / dropsource = true / position = (51%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker5> / items = ("marker5.jpeg") / dropsource = true / position = (53%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker6> / items = ("marker6.jpeg") / dropsource = true / position = (55%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <trial resource> / dropsources = (marker1, marker2, marker3, marker4, marker5, marker6) / droptargets = (orange_basket, green_basket) / stimulusframes = [1=background, marker1, marker2, marker3, marker4, marker5, marker6, orange_basket, green_basket] / showmousecursor = true / inputdevice = dragdrop / validresponse = (orange_basket, green_basket) / correctresponse = ("orange_basket") </trial> Many thanks!! That's entirely possible and you can find plenty of examples in the library (e.g. the Tower of London) or via search in the forums (search for "dragdrop"), e.g, the procedure discussed in https://forums.millisecond.com/Topic29302.aspx and https://forums.millisecond.com/Topic29339.aspx . Very rought, something along the following lines: <picture background> / items = ("background.jpeg") / erase = false / size = (100%, 100%) </picture>
<picture green_basket> / items = ("green_basket.jpeg") / droptarget = true / position = (80%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture orange_basket> / items = ("orange_basket.jpeg") / droptarget = true / position = (20%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker1> / items = ("marker1.jpeg") / dropsource = true / position = (45%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker2> / items = ("marker2.jpeg") / dropsource = true / position = (47%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker3> / items = ("marker3.jpeg") / dropsource = true / position = (49%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker4> / items = ("marker4.jpeg") / dropsource = true / position = (51%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker5> / items = ("marker5.jpeg") / dropsource = true / position = (53%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker6> / items = ("marker6.jpeg") / dropsource = true / position = (55%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<text inorange> / items = ("<%values.orangecount%> items in orange basket") / erase = false / size = (25%, 10%) / position = (20%, 10%) </text>
<text ingreen> / items = ("<%values.greencount%> items in green basket") / erase = false / size = (25%, 10%) / position = (80%, 10%) </text>
<trial resource> / ontrialbegin = [ trial.resource.resetstimulusframes(); ] / ontrialend = [ if (trial.resource.response == "orange_basket") { values.orangecount += 1; } else if (trial.resource.response == "green_basket") { values.greencount += 1; }; if (trial.resource.lastdropsource == "marker1") { picture.marker1.dropsource = false; } else if (trial.resource.lastdropsource == "marker2") { picture.marker2.dropsource = false; } else if (trial.resource.lastdropsource == "marker3") { picture.marker3.dropsource = false; } else if (trial.resource.lastdropsource == "marker4") { picture.marker4.dropsource = false; } else if (trial.resource.lastdropsource == "marker5") { picture.marker5.dropsource = false; } else if (trial.resource.lastdropsource == "marker6") { picture.marker6.dropsource = false; }; ] / dropsources = (marker1, marker2, marker3, marker4, marker5, marker6) / droptargets = (orange_basket, green_basket) / stimulusframes = [1=clearscreen, background, orange_basket, green_basket, inorange, ingreen, marker1, marker2, marker3, marker4, marker5, marker6] / showmousecursor = true / inputdevice = dragdrop / validresponse = (orange_basket, green_basket) / correctresponse = (orange_basket) / branch = [ if (values.orangecount + values.greencount < 6) { return trial.resource; } ] </trial>
<values> / orangecount = 0 / greencount = 0 </values>
<block myblock> / trials = [1=resource] </block>
|
|
|
cehall
|
|
Group: Forum Members
Posts: 6,
Visits: 22
|
+x+x+xHello, I was wondering if anyone knew if it was possible to make a trial/series of trials of dragdrops, such that the previous choice stays on the screen which the participant makes the rest of their selections? The task I am trying to create is a simple resource distribution task where the participants must divide 6 markers between two baskets. The six markers (dropsources) will appear in a central basket (as part of the background image) and must be each be dragged into either the green or orange basket (droptargets). I want the previous the choices to stay on the screen until all 6 markers are sorted. I need the data to record how many markers were placed into each basket. Here's the code I have so far: <picture background> / items = ("background.jpeg") </picture> <picture green_basket> / items = ("green_basket.jpeg") / droptarget = true / position = (80%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture orange_basket> / items = ("orange_basket.jpeg") / droptarget = true / position = (20%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker1> / items = ("marker1.jpeg") / dropsource = true / position = (45%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker2> / items = ("marker2.jpeg") / dropsource = true / position = (47%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker3> / items = ("marker3.jpeg") / dropsource = true / position = (49%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker4> / items = ("marker4.jpeg") / dropsource = true / position = (51%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker5> / items = ("marker5.jpeg") / dropsource = true / position = (53%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <picture marker6> / items = ("marker6.jpeg") / dropsource = true / position = (55%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture> <trial resource> / dropsources = (marker1, marker2, marker3, marker4, marker5, marker6) / droptargets = (orange_basket, green_basket) / stimulusframes = [1=background, marker1, marker2, marker3, marker4, marker5, marker6, orange_basket, green_basket] / showmousecursor = true / inputdevice = dragdrop / validresponse = (orange_basket, green_basket) / correctresponse = ("orange_basket") </trial> Many thanks!! That's entirely possible and you can find plenty of examples in the library (e.g. the Tower of London) or via search in the forums (search for "dragdrop"), e.g, the procedure discussed in https://forums.millisecond.com/Topic29302.aspx and https://forums.millisecond.com/Topic29339.aspx . Very rought, something along the following lines: <picture background> / items = ("background.jpeg") / erase = false / size = (100%, 100%) </picture>
<picture green_basket> / items = ("green_basket.jpeg") / droptarget = true / position = (80%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture orange_basket> / items = ("orange_basket.jpeg") / droptarget = true / position = (20%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker1> / items = ("marker1.jpeg") / dropsource = true / position = (45%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker2> / items = ("marker2.jpeg") / dropsource = true / position = (47%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker3> / items = ("marker3.jpeg") / dropsource = true / position = (49%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker4> / items = ("marker4.jpeg") / dropsource = true / position = (51%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker5> / items = ("marker5.jpeg") / dropsource = true / position = (53%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<picture marker6> / items = ("marker6.jpeg") / dropsource = true / position = (55%, 50%) / dropposition = (anywhere, anywhere) / erase = false </picture>
<text inorange> / items = ("<%values.orangecount%> items in orange basket") / erase = false / size = (25%, 10%) / position = (20%, 10%) </text>
<text ingreen> / items = ("<%values.greencount%> items in green basket") / erase = false / size = (25%, 10%) / position = (80%, 10%) </text>
<trial resource> / ontrialbegin = [ trial.resource.resetstimulusframes(); ] / ontrialend = [ if (trial.resource.response == "orange_basket") { values.orangecount += 1; } else if (trial.resource.response == "green_basket") { values.greencount += 1; }; if (trial.resource.lastdropsource == "marker1") { picture.marker1.dropsource = false; } else if (trial.resource.lastdropsource == "marker2") { picture.marker2.dropsource = false; } else if (trial.resource.lastdropsource == "marker3") { picture.marker3.dropsource = false; } else if (trial.resource.lastdropsource == "marker4") { picture.marker4.dropsource = false; } else if (trial.resource.lastdropsource == "marker5") { picture.marker5.dropsource = false; } else if (trial.resource.lastdropsource == "marker6") { picture.marker6.dropsource = false; }; ] / dropsources = (marker1, marker2, marker3, marker4, marker5, marker6) / droptargets = (orange_basket, green_basket) / stimulusframes = [1=clearscreen, background, orange_basket, green_basket, inorange, ingreen, marker1, marker2, marker3, marker4, marker5, marker6] / showmousecursor = true / inputdevice = dragdrop / validresponse = (orange_basket, green_basket) / correctresponse = (orange_basket) / branch = [ if (values.orangecount + values.greencount < 6) { return trial.resource; } ] </trial>
<values> / orangecount = 0 / greencount = 0 </values>
<block myblock> / trials = [1=resource] </block>
Hi Dave, this worked great! Thank so much, really appreciate it!
|
|
|
cehall
|
|
Group: Forum Members
Posts: 6,
Visits: 22
|
Hello again, I have a follow up question after piloting the measure. Would it be possible to make it that it would allow the participants to change their answers before submitting (i.e., switch a marker from one basket to the other, while still allowing them to sort all six markers)? Additionally, would it be possible to have a way to move on without distributing every marker? Like a next button? But that the number of markers in each basket would still be recorded?
Thanks so much for all the help!
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+xHello again, I have a follow up question after piloting the measure. Would it be possible to make it that it would allow the participants to change their answers before submitting (i.e., switch a marker from one basket to the other, while still allowing them to sort all six markers)? Additionally, would it be possible to have a way to move on without distributing every marker? Like a next button? But that the number of markers in each basket would still be recorded? Thanks so much for all the help! Yes, all of that is perfectly possible.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+x+xHello again, I have a follow up question after piloting the measure. Would it be possible to make it that it would allow the participants to change their answers before submitting (i.e., switch a marker from one basket to the other, while still allowing them to sort all six markers)? Additionally, would it be possible to have a way to move on without distributing every marker? Like a next button? But that the number of markers in each basket would still be recorded? Thanks so much for all the help! Yes, all of that is perfectly possible. Here's a basic sketch. <text background> / items = ("bg") / erase = false / size = (100%, 100%) </text>
<text origin> / items = ("origin") / txbgcolor = lightblue / droptarget = true / position = (50%, 50%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </text>
<text green_basket> / items = ("green_basket.jpeg") / txbgcolor = green / droptarget = true / position = (80%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </text>
<text orange_basket> / items = ("orange_basket.jpeg") / txbgcolor = orange / droptarget = true / position = (20%, 70%) / size = (30%, 30%) / dropposition = (anywhere, anywhere) / erase = false </text>
<text marker1> / items = ("A") / txbgcolor = transparent / dropsource = true / position = (45%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </text>
<text marker2> / items = ("B") / txbgcolor = transparent / dropsource = true / position = (47%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </text>
<text marker3> / items = ("C") / txbgcolor = transparent / dropsource = true / position = (49%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </text>
<text marker4> / items = ("D") / txbgcolor = transparent / dropsource = true / position = (51%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </text>
<text marker5> / items = ("E") / txbgcolor = transparent / dropsource = true / position = (53%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </text>
<text marker6> / items = ("F") / txbgcolor = transparent / dropsource = true / position = (55%, 50%) / size = (2%, 2%) / dropposition = (anywhere, anywhere) / erase = false </text>
<button submit> / caption = "SUBMIT" / erase = false / position = (50%, 90%) / size = (20%, 10%) </button>
<text inorange> / items = ("<%values.orangecount%> item(s) in orange basket") / erase = false / size = (25%, 10%) / position = (20%, 10%) </text>
<text ingreen> / items = ("<%values.greencount%> item(s) in green basket") / erase = false / size = (25%, 10%) / position = (80%, 10%) </text>
<text inorigin> / items = ("<%values.origincount%> item(s) undistributed") / erase = false / size = (25%, 10%) / position = (50%, 10%) </text>
<trial resource> / ontrialbegin = [ trial.resource.resetstimulusframes(); // update counts values.origincount = list.originlist.itemcount; values.orangecount = list.orangelist.itemcount; values.greencount = list.greenlist.itemcount; ] / ontrialend = [ // marker is put into origin basket if (trial.resource.response == "origin") { if (list.originlist.indexof(trial.resource.lastdropsource) == -1) { // if marker wasn't already in origin basket list.originlist.appenditem(trial.resource.lastdropsource); // add it to the origin basket list if (list.greenlist.indexof(trial.resource.lastdropsource) != -1) { // if marker was previously in green basket list.greenlist.removeitem(list.greenlist.indexof(trial.resource.lastdropsource)); // remove it from the green basket list }; if (list.orangelist.indexof(trial.resource.lastdropsource) != -1) { // if marker was previously in orange basket list.orangelist.removeitem(list.orangelist.indexof(trial.resource.lastdropsource)); // remove it from orange basket list }; }; }; // marker is put into green basket if (trial.resource.response == "green_basket") { if (list.greenlist.indexof(trial.resource.lastdropsource) == -1) { // if marker wasn't already in green basket list.greenlist.appenditem(trial.resource.lastdropsource); // add it to the green basket list if (list.originlist.indexof(trial.resource.lastdropsource) != -1) { // if marker was previously in origin basket list.originlist.removeitem(list.originlist.indexof(trial.resource.lastdropsource)); // remove it from origin basket list }; if (list.orangelist.indexof(trial.resource.lastdropsource) != -1) { // if marker was previously in orange basket list.orangelist.removeitem(list.orangelist.indexof(trial.resource.lastdropsource)); // remove it from orange basket list }; }; }; // marker is put into orange basket if (trial.resource.response == "orange_basket") { if (list.orangelist.indexof(trial.resource.lastdropsource) == -1) { // if marker wasn't already in orange basket list.orangelist.appenditem(trial.resource.lastdropsource); // add it to the orange basket list if (list.greenlist.indexof(trial.resource.lastdropsource) != -1) { // if marker was previously in green basket list.greenlist.removeitem(list.greenlist.indexof(trial.resource.lastdropsource)); // remove it from green basket list }; if (list.originlist.indexof(trial.resource.lastdropsource) != -1) { // if marker was previously in origin basket list.originlist.removeitem(list.originlist.indexof(trial.resource.lastdropsource)); // remove it from origin basket list }; }; }; // update counts values.origincount = list.originlist.itemcount; values.greencount = list.greenlist.itemcount; values.orangecount = list.orangelist.itemcount; ] / dropsources = (marker1, marker2, marker3, marker4, marker5, marker6) / droptargets = (orange_basket, green_basket) / stimulusframes = [1=clearscreen, background, origin, orange_basket, green_basket, inorigin, inorange, ingreen, marker1, marker2, marker3, marker4, marker5, marker6, submit] / showmousecursor = true / inputdevice = dragdrop / validresponse = (orange_basket, green_basket, origin, submit) / correctresponse = (orange_basket) / branch = [ if (trial.resource.response != "submit") { return trial.resource; } ] </trial>
<list originlist> / items = ("marker1", "marker2", "marker3", "marker4", "marker5", "marker6") </list>
<list greenlist> </list>
<list orangelist> </list>
<values> / orangecount = 0 / greencount = 0 / origincount = 0 </values>
<block myblock> / trials = [1=resource] </block>
|
|
|
cehall
|
|
Group: Forum Members
Posts: 6,
Visits: 22
|
Thank you so much, was able to get it working!! Really appreciate the help once again!
|
|
|