Dear all,
I am new to Inquisit and currently trying to program a new script with the help of the manual and the forum.
At the moment, I want to do the following (which seems quite simple to me): I have 8 pictures, which are my droptargets, and 8 pictures, which are my dropsources and which shall be dropped onto the targets. There is no correct solution and I do not want to record the data (it is just supposed to be a stimulus setting).
With the help of the following threads
https://www.millisecond.com/forums/Topic24644-1.aspx,
https://www.millisecond.com/forums/Topic18181.aspx, and
https://www.millisecond.com/forums/Topic25457-1.aspx I have managed to create a page, where all droptargets and dropsources are shown correctly and where I can allocate the 8 sources to the 8 targets. However, after the allocation, the script just does not continue, although in the next step I would like to show a picture with the optimal allocation of the different stimuli. I have tried everything I could think of, but the script just stops there, although all sources have been allocated.
I have experimented with two versions of the script. The first version works exactly as I would like it to work, except for the problem described above. The trial "end" is never reached:
<block myblock>
/ trials = [1 = start; 2 = end]
/ recorddata = false
</block>
<trial start>
/ stimulusframes = [1=Instruction, Target1, Target2, Target3, Target4, Target5, Target6, Target7, Target8, Source1, Source2, Source3, Source4, Source5, Source6, Source7, Source8]
/ inputdevice = dragdrop
/ showmousecursor = true
/ isvalidresponse = [(trial.dragdrop.response == Target1) && (trial.dragdrop.response == Target2) && (trial.dragdrop.response == Target3) && (trial.dragdrop.response == Target4) && (trial.dragdrop.response == Target5) && (trial.dragdrop.response == Target6) && (trial.dragdrop.response == Target7) && (trial.dragdrop.response == Target8)]
/ recorddata = false
</trial>
<trial end>
/ stimulusframes = [1=Solution, Continue]
/ validresponse = (" ")
/ recorddata = false
</trial>
...
Based on the thread
https://www.millisecond.com/forums/Topic24644-1.aspx I have also created another version of the script, to solve my problem. Still, also with this version I could drag and drop pictures for all eternity, as here again the script does not continue to the last trial. Moreover, with this version I have the problem that once I have allocated a source onto a target and then decide to allocate in on another target, the first target is blocked for all sources for good - except for target no. 4 and no. 8, onto which all sources can be dropped at will:
<block myblock>
/ trials = [1=start]
</block>
<expressions>
/ available_p1_slots = if(mod(values.p1_count,2)==0) true else false
/ available_p2_slots = if(mod(values.p2_count,2)==0) true else false
/ available_p3_slots = if(mod(values.p3_count,2)==0) true else false
/ available_p4_slots = if(mod(values.p4_count,2)==0) true else false
/ available_p5_slots = if(mod(values.p5_count,2)==0) true else false
/ available_p6_slots = if(mod(values.p6_count,2)==0) true else false
/ available_p7_slots = if(mod(values.p7_count,2)==0) true else false
/ available_p8_slots = if(mod(values.p8_count,2)==0) true else false
</expressions>
<values>
/ p1_count = 0
/ p2_count = 0
/ p3_count = 0
/ p4_count = 0
/ p5_count = 0
/ p6_count = 0
/ p7_count = 0
/ p8_count = 0
</values>
<trial start>
/ ontrialbegin = [
values.p1_count=0;
values.p2_count=0;
values.p3_count=0;
values.p4_count=0;
values.p5_count=0;
values.p6_count=0;
values.p7_count=0;
values.p8_count=0;
]
/ branch = [
trial.mytrial
]
/ trialduration = 0
</trial>
<trial mytrial>
/ ontrialbegin = [
picture.Target1.droptarget = expressions.available_p1_slots;
picture.Target2.droptarget = expressions.available_p2_slots;
picture.Target3.droptarget = expressions.available_p3_slots;
picture.Target4.droptarget = expressions.available_p4_slots;
picture.Target5.droptarget = expressions.available_p5_slots;
picture.Target6.droptarget = expressions.available_p6_slots;
picture.Target7.droptarget = expressions.available_p7_slots;
picture.Target8.droptarget = expressions.available_p8_slots;
]
/ ontrialend = [
picture.Target1.droptarget = expressions.available_p1_slots;
picture.Target2.droptarget = expressions.available_p2_slots;
picture.Target3.droptarget = expressions.available_p3_slots;
picture.Target4.droptarget = expressions.available_p4_slots;
picture.Target5.droptarget = expressions.available_p5_slots;
picture.Target6.droptarget = expressions.available_p6_slots;
picture.Target7.droptarget = expressions.available_p7_slots;
picture.Target8.droptarget = expressions.available_p8_slots;
]
/ stimulustimes = [0 = Instruction, Target1, Target2, Target3, Target4, Target5, Target6, Target7, Target8, Source1, Source2, Source3, Source4, Source5, Source6, Source7, Source8]
/ validresponse = (Target1, Target2, Target3, Target4, Target5, Target6, Target7, Target8)
/ isvalidresponse = [
if (trial.mytrial.response == "Target1")
{
values.p1_count += 1;
picture.Target1.droptarget;
}
else if (trial.mytrial.response == "Target2")
{
values.p2_count += 1;
picture.Target2.droptarget;
}
else if (trial.mytrial.response == "Target3")
{
values.p3_count += 1;
picture.Target3.droptarget;
}
else if (trial.mytrial.response == "Target4")
{
values.p4_count += 1;
picture.Target4.droptarget;
}
else if (trial.mytrial.response == "Target5")
{
values.p5_count += 1;
picture.Target5.droptarget;
}
else if (trial.mytrial.response == "Target6")
{
values.p6_count += 1;
picture.Target6.droptarget;
}
else if (trial.mytrial.response == "Target7")
{
values.p7_count += 1;
picture.Target7.droptarget;
}
else if (trial.mytrial.response == "Target8")
{
values.p8_count += 1;
picture.Target8.droptarget;
}
else
true;
]
/ inputdevice = dragdrop
/ branch = [
if ((expressions.available_p1_slots + expressions.available_p2_slots + expressions.available_p3_slots + expressions.available_p4_slots + expressions.available_p5_slots + expressions.available_p6_slots + expressions.available_p7_slots + expressions.available_p8_slots) <= 0) trial.end else trial.mytrial
]
</trial>
<trial end>
/ stimulusframes = [1=Solution, Continue]
/ validresponse = (" ")
</trial>
...
If anybody has a hint for me what I have to improve, I would be very grateful! I apologize, if I have made obvious mistakes.
Many thanks in advance for your help!