+xSorry, I had some internet problems. I have two questions about your code which I tried to use for my study.
<item Woman>
/1 = "Woman.png"
</item>
<item Scenario>
/1 = "Scenario.png"
</item>
<picture Woman>
/ items = item.Woman
/ size = (40%, 40%)
/ animation=path(5000, 4, 20, 50, 50, 70)
</picture>
<picture Scenario>
/ items = item.Scenario
/ position = (50%, 50%)
/ size = (100%, 80%)
</picture>
<trial Woman>
/ stimulusframes = [1=Woman, Scenario]
/ validresponse = (57)
</trial>
<trial Scenario>
/ stimulustimes = [1=Scenario]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>
<block Woman>
/ trials = [1 = Woman]
</block>
<data>
/ columns = (date time subject group session blocknum blockcode trialnum trialcode response latency
picture.Woman.xpct, picture.Woman.ypct)
/ separatefiles = true
</data>
(1) What does validresponse = (57) stand for?
(2) The output of this animation is still not clear to me. With the mentioned code, will I get in the output (data file) the on-screen position of the picture at the time of a keypress which I can use for measuring /comparing the distance, or do I have to include something else additionally in the script to get this?
> (1) What does validresponse = (57) stand for?
57 is the space bar's keyboard scancode, i.e. it defines a press on the spacebar as the trial's valid response. See Tools -> Keyboard scancodes... and
https://www.millisecond.com/support/docs/v6/html/language/scancodes.htm> (2) The output of this animation is still not clear to me. With the mentioned code, will I get in the output (data file) the on-screen position of the picture at the time of a keypress which I can use for measuring /comparing the distance [....]
What exactly isn't clear to you? picture.Woman.xpct and picture.Woman.ypct are the coordinates -- x (horizontal) and y (vertical) -- of the image in percentages at the time the space bar was pressed. Calculating a distance -- be it from the avatar's starting position at 5% (x) and 20% (y) or the avatar's end position at 50% (x) and 70% (y) -- from that requires only basic trigonometry. Percentages are the correct unit if you size and position everything in percentages, as your current code does. The only other thing you should do is define a uniform canvasaspectratio so that -- relatively speaking -- the relative sizes and positions are consistent across different displays with different native aspec ratios. I.e. something like
<defaults>
/ canvasaspectratio = (4,3)/ canvassize = (100%, 100%)
</defaults>
<item Woman>
/1 = "Woman.png"
</item>
<item Scenario>
/1 = "Scenario.png"
</item>
<picture Woman>
/ items = item.Woman
/ size = (40%, 40%)
/ animation=path(5000, 4, 20%, 50%, 50%, 70%)
</picture>
<picture Scenario>
/ items = item.Scenario
/ position = (50%, 50%)
/ size = (100%, 80%)
</picture>
<trial Woman>
/ stimulusframes = [1=Woman, Scenario]
/ validresponse = (57)
</trial>
<trial Scenario>
/ stimulustimes = [1=Scenario]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>
<block Woman>
/ trials = [1 = Woman]
</block>
<data>
/ columns = (date time subject group session blocknum blockcode trialnum trialcode response latency
picture.Woman.xpct, picture.Woman.ypct)
/ separatefiles = true
</data>
Now, ideally, you would define a square canvas, which would make the x vs y percentages directly comparable, i.e. 32% on the x-axis is exactly the same physical distance as 32% on the y-axis, which isn't the case if your canvas is wider than it is high or vice versa.
<defaults>
/ canvasaspectratio = (1,1)/ canvassize = (100%, 100%)
</defaults>
<item Woman>
/1 = "Woman.png"
</item>
<item Scenario>
/1 = "Scenario.png"
</item>
<picture Woman>
/ items = item.Woman
/ size = (40%, 40%)
/ animation=path(5000, 4, 20%, 50%, 50%, 70%)
</picture>
<picture Scenario>
/ items = item.Scenario
/ position = (50%, 50%)
/ size = (100%, 80%)
</picture>
<trial Woman>
/ stimulusframes = [1=Woman, Scenario]
/ validresponse = (57)
</trial>
<trial Scenario>
/ stimulustimes = [1=Scenario]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>
<block Woman>
/ trials = [1 = Woman]
</block>
<data>
/ columns = (date time subject group session blocknum blockcode trialnum trialcode response latency
picture.Woman.xpct, picture.Woman.ypct)
/ separatefiles = true
</data>