Millisecond Forums

Moving image within trial

https://forums.millisecond.com/Topic15471.aspx

By kellingwolf00013 - 2/4/2015

Is there a method by which I can move an object slowly across the screen within a trial.  I attempted to use an shape element with the position tied to a counter and repeat the call for the element within the stimulusframes argument in the trial.  However, it seems to stay where it is.
Thanks,

<block test>
/trials = [1-5= testtrial]
</block>

<trial testtrial>
/ stimulusframes = [1-1000=sequence(erase,blocky)]
/ validresponse = (" ")
/ responsetime = 0
</trial>



<shape blocky>
/ shape = rectangle
/ size = (50,20)
/ color = (0,0,0)
/ position = (expressions.xplus, expressions.yplus)
</shape>

<expressions>
/ xplus = 100-1*round(counter.county/50)
/yplus = 50
</expressions>

<counter county>
/ selectionrate = always
/ items = (1-1000)
/ select = sequence
</counter>

<shape erase>
/ shape = rectangle
/ size = (100%,100%)
/ color = (255,255,255)
/ position = (expressions.xplus, expressions.yplus)
</shape>
By Dave - 2/4/2015

> Is there a method by which I can move an object slowly across the screen within a trial.

No, there isn't. You either (1) need to set up multiple <shape>s, one for each "step" in the movement sequence, and display them all successively via /stimulustimes, or (2) run a <trial> element displaying a single <shape> & lasting one frame repeatedly in a loop.