Pause a moving stimulus


Author
Message
InquisitJStudy
InquisitJStudy
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)
Group: Forum Members
Posts: 2, Visits: 17
Hi there,

I am new to programming and Inquisit. I am wanting to produce an experiment that simulates the act of scrolling through images on a phone app, like Facebook or Instagram. To do so, I've used the animation path in my <picture> code, to make each image on each trial move from the bottom of the screen to the top of the screen over a 1000 ms period. However, what I would really like to do, is to have the animation of each of the images pause when its get to the middle of the screen, for 10 seconds, and then continue to the top of the screen. Right now what seems to happen, is that the pause only happens after the image is done moving to the top of the screen. Is there any way to pause the image in the middle of the screen, halfway through the animation?

This is my script currently:

<picture bop>
/items = ("cat5-1.jpg", "cat5-2.jpg", "cat5-3.jpg")
/animation = path(1000, 1, 50%, 100%, 50%, 0%, 50%, -50%)
</picture>

<item bop>
/items = bop
/select = noreplace
</item>

<trial boptrial>
/stimulusframes = [1=bop]
/validresponse = (0)
/trialduration = 10000
</trial>

<block bopblock>
/trials = [1-3 = boptrial]
</block>


Any help on this would be greatly appreciated! Thank you.
Dave
Dave
Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)
Group: Administrators
Posts: 10K, Visits: 51K
InquisitJStudy - 2/6/2020
Hi there,

I am new to programming and Inquisit. I am wanting to produce an experiment that simulates the act of scrolling through images on a phone app, like Facebook or Instagram. To do so, I've used the animation path in my <picture> code, to make each image on each trial move from the bottom of the screen to the top of the screen over a 1000 ms period. However, what I would really like to do, is to have the animation of each of the images pause when its get to the middle of the screen, for 10 seconds, and then continue to the top of the screen. Right now what seems to happen, is that the pause only happens after the image is done moving to the top of the screen. Is there any way to pause the image in the middle of the screen, halfway through the animation?

This is my script currently:

<picture bop>
/items = ("cat5-1.jpg", "cat5-2.jpg", "cat5-3.jpg")
/animation = path(1000, 1, 50%, 100%, 50%, 0%, 50%, -50%)
</picture>

<item bop>
/items = bop
/select = noreplace
</item>

<trial boptrial>
/stimulusframes = [1=bop]
/validresponse = (0)
/trialduration = 10000
</trial>

<block bopblock>
/trials = [1-3 = boptrial]
</block>


Any help on this would be greatly appreciated! Thank you.

You'll have to do something like this:

<picture bop1>
/items = bopitems
/animation = path(500, 1, 50%, 100%, 50%, 50%)
/select = noreplace
/ erase = false
</picture>

<picture bop2>
/items = bopitems
/animation = path(500, 1, 50%, 50%, 50%, -50%)
/select = picture.bop1.currentindex
/ erase = false
</picture>

<item bopitems>
/ 1 = "cat5-1.jpg"
/ 2 = "cat5-2.jpg"
/ 3 = "cat5-3.jpg"
</item>

<trial bop1>
/ ontrialbegin = [
    trial.bop1.resetstimulusframes();
]
/stimulustimes = [0=clearscreen,bop1]
/validresponse = (0)
/trialduration = 10000
/ branch = [
    trial.bop2
]
</trial>

<trial bop2>
/ ontrialbegin = [
    trial.bop2.resetstimulusframes();
]
/stimulustimes = [0=clearscreen,bop2]
/validresponse = (0)
/trialduration = 1000
</trial>

<block bopblock>
/trials = [1-3 = bop1]
</block>
InquisitJStudy
InquisitJStudy
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)
Group: Forum Members
Posts: 2, Visits: 17
Dave - 2/6/2020
InquisitJStudy - 2/6/2020
Hi there,

I am new to programming and Inquisit. I am wanting to produce an experiment that simulates the act of scrolling through images on a phone app, like Facebook or Instagram. To do so, I've used the animation path in my <picture> code, to make each image on each trial move from the bottom of the screen to the top of the screen over a 1000 ms period. However, what I would really like to do, is to have the animation of each of the images pause when its get to the middle of the screen, for 10 seconds, and then continue to the top of the screen. Right now what seems to happen, is that the pause only happens after the image is done moving to the top of the screen. Is there any way to pause the image in the middle of the screen, halfway through the animation?

This is my script currently:

<picture bop>
/items = ("cat5-1.jpg", "cat5-2.jpg", "cat5-3.jpg")
/animation = path(1000, 1, 50%, 100%, 50%, 0%, 50%, -50%)
</picture>

<item bop>
/items = bop
/select = noreplace
</item>

<trial boptrial>
/stimulusframes = [1=bop]
/validresponse = (0)
/trialduration = 10000
</trial>

<block bopblock>
/trials = [1-3 = boptrial]
</block>


Any help on this would be greatly appreciated! Thank you.

You'll have to do something like this:

<picture bop1>
/items = bopitems
/animation = path(500, 1, 50%, 100%, 50%, 50%)
/select = noreplace
/ erase = false
</picture>

<picture bop2>
/items = bopitems
/animation = path(500, 1, 50%, 50%, 50%, -50%)
/select = picture.bop1.currentindex
/ erase = false
</picture>

<item bopitems>
/ 1 = "cat5-1.jpg"
/ 2 = "cat5-2.jpg"
/ 3 = "cat5-3.jpg"
</item>

<trial bop1>
/ ontrialbegin = [
    trial.bop1.resetstimulusframes();
]
/stimulustimes = [0=clearscreen,bop1]
/validresponse = (0)
/trialduration = 10000
/ branch = [
    trial.bop2
]
</trial>

<trial bop2>
/ ontrialbegin = [
    trial.bop2.resetstimulusframes();
]
/stimulustimes = [0=clearscreen,bop2]
/validresponse = (0)
/trialduration = 1000
</trial>

<block bopblock>
/trials = [1-3 = bop1]
</block>

Thanks Dave, that was really helpful!

I also wondered if it was possible to have an image of a logo in the trials, positioned in the top middle of the screen, so that when the main image moves up towards the top of the screen, it looks more like a newsfeed. However, the main image would need to pass under this logo image, rather than over the top of it. Is this possible in Inquisit? I've tried the /bgstim in my block, but it hasn't worked.

Thank you for your assistance, I appreciate it.
Dave
Dave
Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)Supreme Being (781K reputation)
Group: Administrators
Posts: 10K, Visits: 51K
InquisitJStudy - 2/10/2020
Dave - 2/6/2020
InquisitJStudy - 2/6/2020
Hi there,

I am new to programming and Inquisit. I am wanting to produce an experiment that simulates the act of scrolling through images on a phone app, like Facebook or Instagram. To do so, I've used the animation path in my <picture> code, to make each image on each trial move from the bottom of the screen to the top of the screen over a 1000 ms period. However, what I would really like to do, is to have the animation of each of the images pause when its get to the middle of the screen, for 10 seconds, and then continue to the top of the screen. Right now what seems to happen, is that the pause only happens after the image is done moving to the top of the screen. Is there any way to pause the image in the middle of the screen, halfway through the animation?

This is my script currently:

<picture bop>
/items = ("cat5-1.jpg", "cat5-2.jpg", "cat5-3.jpg")
/animation = path(1000, 1, 50%, 100%, 50%, 0%, 50%, -50%)
</picture>

<item bop>
/items = bop
/select = noreplace
</item>

<trial boptrial>
/stimulusframes = [1=bop]
/validresponse = (0)
/trialduration = 10000
</trial>

<block bopblock>
/trials = [1-3 = boptrial]
</block>


Any help on this would be greatly appreciated! Thank you.

You'll have to do something like this:

<picture bop1>
/items = bopitems
/animation = path(500, 1, 50%, 100%, 50%, 50%)
/select = noreplace
/ erase = false
</picture>

<picture bop2>
/items = bopitems
/animation = path(500, 1, 50%, 50%, 50%, -50%)
/select = picture.bop1.currentindex
/ erase = false
</picture>

<item bopitems>
/ 1 = "cat5-1.jpg"
/ 2 = "cat5-2.jpg"
/ 3 = "cat5-3.jpg"
</item>

<trial bop1>
/ ontrialbegin = [
    trial.bop1.resetstimulusframes();
]
/stimulustimes = [0=clearscreen,bop1]
/validresponse = (0)
/trialduration = 10000
/ branch = [
    trial.bop2
]
</trial>

<trial bop2>
/ ontrialbegin = [
    trial.bop2.resetstimulusframes();
]
/stimulustimes = [0=clearscreen,bop2]
/validresponse = (0)
/trialduration = 1000
</trial>

<block bopblock>
/trials = [1-3 = bop1]
</block>

Thanks Dave, that was really helpful!

I also wondered if it was possible to have an image of a logo in the trials, positioned in the top middle of the screen, so that when the main image moves up towards the top of the screen, it looks more like a newsfeed. However, the main image would need to pass under this logo image, rather than over the top of it. Is this possible in Inquisit? I've tried the /bgstim in my block, but it hasn't worked.

Thank you for your assistance, I appreciate it.

Making the "logo" an animation, too -- just one that effectively remains in a single spot -- and drawing it as the last stimulus should work:

<picture bop1>
/items = bopitems
/animation = path(500, 1, 50%, 100%, 50%, 50%)
/select = noreplace
/ erase = false
</picture>

<picture bop2>
/items = bopitems
/animation = path(500, 1, 50%, 50%, 50%, -50%)
/select = picture.bop1.currentindex
/ erase = false
</picture>

<item bopitems>
/ 1 = "cat5-1.jpg"
/ 2 = "cat5-2.jpg"
/ 3 = "cat5-3.jpg"
</item>

<picture logo>
/ items = ("logo.jpg")
/ animation = path(500, 1, 50%, 5%, 50%, 5%)
/ position = (50%, 5%)
/ erase = false
</picture>

<trial bop1>
/ ontrialbegin = [
    trial.bop1.resetstimulusframes();
]
/stimulustimes = [0=clearscreen,bop1,logo]
/validresponse = (0)
/trialduration = 10000
/ branch = [
    trial.bop2
]
</trial>

<trial bop2>
/ ontrialbegin = [
    trial.bop2.resetstimulusframes();
]
/stimulustimes = [0=clearscreen,bop2, logo]
/validresponse = (0)
/trialduration = 1000
</trial>

<block bopblock>
/trials = [1-3 = bop1]
</block>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search