Millisecond Forums

randomly display picture

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

By beccca - 7/2/2013

Hello everyone


In my study I want the computer to flip a coin for the participants.


I have one page where they see the coin and can click on it, afterwards there is a picture of a coin flip shown and after that I want to display either a picture of heads or a picture of tail. The computer should chose the picture randomly.


I tried different things but nothing worked. I also tried to find something on the forum but I haven't found something that really helps me.


I'm a total beginner. This is the second study I try to do with Inquisit.


Thank you for your help :).


Becca

By Dave - 7/2/2013

I would recommend you start by completing all the tutorials included in the Inquisit documentation. Once you have done so, you should be able to implement this without any major problems. You only need very elementary features / syntax for that.

By Dave - 7/2/2013

FWIW, here's a basic skeleton outlining how to do this:


<block myblock>
/ trials = [1-4=sequence(initiatecoinflip, coinflipresult)]
</block>

<trial initiatecoinflip>
/ stimulusframes = [1=clickoncoin]
/ validresponse = (clickoncoin)
/ inputdevice = mouse
</trial>

<trial coinflipresult>
/ stimulustimes = [0=coininmotion; 1500=coinresult]
/ validresponse = (noresponse)
/ trialduration = 3000
</trial>

<text clickoncoin>
/ items = ("Imagine I'm a picture of a coin. Click me.")
/ size = (25%, 25%)
</text>

<text coininmotion>
/ items = ("Imagine I'm a video of a coin being flipped.")
/ size = (25%, 25%)
</text>

<text coinresult>
/ items = ("Result: Heads", "Result: Tails")
/ size = (25%, 25%)
/ select = replace
</text>


As you can see, it's fairly straightforward and the exact same logic applies to using <picture> and/or <video> elements instead of <text>.