﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 6  » Displaying a picture based on user input</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Mon, 14 Sep 2026 02:21:10 GMT</lastBuildDate><ttl>20</ttl><item><title>Displaying a picture based on user input</title><link>https://forums.millisecond.com/Topic32483.aspx</link><description>Hi there!&lt;br/&gt;&lt;br/&gt;I'm quite new to Inquisit and am trying to figure out how a participant can choose a picture from a set of four that will then be displayed later in the task.&amp;nbsp;The problem I've having is that no matter which picture is chosen, the first item from avatarchosen is displayed (the Penguin, in this case). Below, I've included the code for when the picture is chosen and an example trial that I'd like the "chosenavatar" picture displayed in. I suspect the problem has something to do with the participantavatars list not populating, but I'm not sure. Any help you can offer would be much appreciated :)&lt;br/&gt;&lt;br/&gt;&amp;lt;item avatarchosen&amp;gt;&lt;br/&gt;/ 1 = "Penguin.png"&lt;br/&gt;/ 2 = "Panther.png"&lt;br/&gt;/ 3 = "Tabby.png"&lt;br/&gt;/ 4 = "Stag.jpg"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture chosenavatar&amp;gt;&lt;br/&gt;/ items = avatarchosen&lt;br/&gt;/ size = (15%, 15%)&lt;br/&gt;/ position = (50%, 25%)&lt;br/&gt;/ select = list.participantavatars.currentindex&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list participantavatars&amp;gt;&lt;br/&gt;/ poolsize = 1&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial instruction3&amp;gt;&lt;br/&gt;/ stimulustimes = [0=clearscreen, picture.Slide3, Penguin, Panther, Tabby, Stag]&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ ontrialbegin = [list.participantavatars.clearitems()]&lt;br/&gt;/ validresponse = (picture.Penguin, picture.Panther, picture.Tabby, picture.Stag)&lt;br/&gt;/ ontrialend = [if (trial.instruction3.response == picture.Penguin) list.participantavatars.insertitem("item.Penguin", 1)&lt;br/&gt;else if (trial.instruction3.response == picture.Panther) list.participantavatars.insertitem("item.Panther", 1)&lt;br/&gt;else if (trial.instruction3.response == picture.Tabby) list.participantavatars.insertitem("item.Tabby", 1)&lt;br/&gt;else if (trial.instruction3.response == picture.Stag) list.participantavatars.insertitem("item.Stag", 1)]&lt;br/&gt;/ branch = [trial.instruction4]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial RCstart&amp;gt;&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.trialcounter += 1&lt;br/&gt;]&lt;br/&gt;/ stimulustimes = [0= RCV1; 6000= clearscreen, Bear, Wildebeest, YOU, AtoB_static, picture.chosenavatar, Game; &lt;br/&gt;11000= clearscreen, Bear, Wildebeest, YOU, AtoB_static, picture.chosenavatar,3; &lt;br/&gt;12000=  clearscreen, Bear, Wildebeest, YOU, AtoB_static, picture.chosenavatar,2; &lt;br/&gt;13000=  clearscreen, Bear, Wildebeest, YOU, AtoB_static, picture.chosenavatar,1; &lt;br/&gt;14000= clearscreen, Bear, Wildebeest, YOU, AtoB_static, picture.chosenavatar,play; &lt;br/&gt;15000= clearscreen, Bear, Wildebeest, YOU, AtoB_static, picture.chosenavatar,video.AtoB]&lt;br/&gt;/ timeout = 0&lt;br/&gt;/ branch = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.2P&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;</description><pubDate>Fri, 19 Nov 2021 17:05:48 GMT</pubDate><dc:creator>Cowdice</dc:creator></item><item><title>RE: Displaying a picture based on user input</title><link>https://forums.millisecond.com/Topic32485.aspx</link><description>Thank you, Dave, this is very helpful!</description><pubDate>Fri, 19 Nov 2021 17:05:48 GMT</pubDate><dc:creator>Cowdice</dc:creator></item><item><title>RE: Displaying a picture based on user input</title><link>https://forums.millisecond.com/Topic32484.aspx</link><description>&lt;br/&gt;Your syntax in &amp;lt;trial instruction3&amp;gt; is all wrong. You'll want to do something like this:&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ chosenavatar = 1&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture chosenavatar&amp;gt;&lt;br/&gt;/ items = avatarchosen&lt;br/&gt;/ size = (15%, 15%)&lt;br/&gt;/ position = (50%, 25%)&lt;br/&gt;&lt;strong&gt;/ select = values.chosenavatar&lt;/strong&gt;&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial instruction3&amp;gt;&lt;br/&gt;/ stimulustimes = [0=clearscreen, picture.Slide3, Penguin, Panther, Tabby, Stag]&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ validresponse = (picture.Penguin, picture.Panther, picture.Tabby, picture.Stag)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (trial.instruction3.response == "Penguin") {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.chosenavatar = 1;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else if (trial.instruction3.response == "Panther") {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.chosenavatar = 2;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else if (trial.instruction3.response == "Tabby") {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.chosenavatar = 3;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else if (trial.instruction3.response == "Stag") {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.chosenavatar = 4;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;br/&gt;]&lt;/strong&gt;&lt;br/&gt;/ branch = [trial.instruction4]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;</description><pubDate>Fri, 19 Nov 2021 12:47:42 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>