# How to make a task containing different type of stimulis

**URL:** <https://discourse.psychopy.org/t/how-to-make-a-task-containing-different-type-of-stimulis/4205>\
**Category:** Builder\
**Created:** [March 26, 2018, 1:33am UTC](https://discourse.psychopy.org/t/how-to-make-a-task-containing-different-type-of-stimulis/4205 "2018-03-26T01:33:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Demeh](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@Demeh](https://discourse.psychopy.org/u/Demeh)\
**Post date:** [March 26, 2018, 1:33am UTC](https://discourse.psychopy.org/t/how-to-make-a-task-containing-different-type-of-stimulis/4205/1 "2018-03-26T01:33:00Z")

</div>

Hello everyone, I’m using version 1.85.4  
I have some issues trying to make a task containing both images and words shown randomly (my experiment aims the recognition of emotion),  
I managed to create a loop and put my excel file with images but I’m stuck with the “word” part. I have an excel file for the word part but I don’t know where to put it and therefore don’t know how I could mix the “image routine” and the “word routine” in order to have them running as one task.  
If someone could explain how I can set this type of task you’d save me

---

<div class="post-metadata">

**Author:** ![dvbridges](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dvbridges/32/1918_2.png) [@dvbridges](https://discourse.psychopy.org/u/dvbridges)\
**Post date:** [March 26, 2018, 9:37am UTC](https://discourse.psychopy.org/t/how-to-make-a-task-containing-different-type-of-stimulis/4205/2 "2018-03-26T09:37:41Z")

</div>

Hi @Demeh, to do this you can include both the word and text components in the same routine. In the attached example, there is a text and shape stimuli, and their parameters are defined in the wordPics spreadsheet where each row represents a single trial. The word is defined using variable called `yourText` from the spreadsheet and is updated on “every repeat” - or trial. If you do not want a word shown, just add a single space to a cell. The image is pre-defined, but the opacity determines whether or not to show the picture, and this is defined using the `yourPicOpac` variable from the spreadsheet, and is updated on “every repeat”. To use the spreadsheet variables, insert a loop into the flow in builder, and point the `Conditions` parameter of the loop to your conditions spreadsheet. Example attached.

[wordPics.psyexp](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/2X/2/2f82dc8f462449748ac5c2c47bc89e43f4d12f95.psyexp) (6.1 KB)  
[wordPics.xlsx](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/2X/8/84a4e82ef26c38b1239689ce03d19ddd2c28fc7e.xlsx) (8.2 KB)

---

<div class="post-metadata">

**Author:** ![Demeh](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@Demeh](https://discourse.psychopy.org/u/Demeh)\
**Post date:** [March 26, 2018, 1:24pm UTC](https://discourse.psychopy.org/t/how-to-make-a-task-containing-different-type-of-stimulis/4205/3 "2018-03-26T13:24:22Z")

</div>

Thank you very much ! I’ll do that and if I have other question I’ll let you know

---

<div class="post-metadata">

**Author:** ![Demeh](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@Demeh](https://discourse.psychopy.org/u/Demeh)\
**Post date:** [March 28, 2018, 3:54pm UTC](https://discourse.psychopy.org/t/how-to-make-a-task-containing-different-type-of-stimulis/4205/4 "2018-03-28T15:54:51Z")

</div>

Actually I tried what you told me, but your manipulation is not what I was asking, I’m sorry I wasn’t clear enough.  
I wouldd like to know how to create an experiment (perception of emotions) with a task containing different type of stimuli (text and images) but not showing at the same time, I would like them to show randomly  
For example one random sequence could be : img img word word word img word img

---

<div class="post-metadata">

**Author:** ![Yiannis](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/yiannis/32/35056_2.png) [@Yiannis](https://discourse.psychopy.org/u/Yiannis)\
**Post date:** [March 28, 2018, 10:00pm UTC](https://discourse.psychopy.org/t/how-to-make-a-task-containing-different-type-of-stimulis/4205/5 "2018-03-28T22:00:08Z")

</div>

Assuming that either images or text appear at the center of screen, and the images are not presented fullscreen what about the attached conditions file. Note, the file only tries to show you the logic.

So you have both image stimulus and text stimulus in the same routine, both appear at the same time **but** you make either of them invisible in each trial.

[conditions.csv](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/2X/d/d5170f72580d61f2a9515f9100a85c49fd660c94.csv) (282 Bytes)

---

<div class="post-metadata">

**Author:** ![Mar\_CR](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/mar_cr/32/6651_2.png) [@Mar\_CR](https://discourse.psychopy.org/u/Mar_CR)\
**Post date:** [January 21, 2020, 3:40pm UTC](https://discourse.psychopy.org/t/how-to-make-a-task-containing-different-type-of-stimulis/4205/6 "2020-01-21T15:40:03Z")

</div>

Hi! I am interested in doing sth similar in one of my experiments but adding the condition that when the image appears, a key response should follow as an attention check, also placed randomly along the trials. So, sth like sound sound - image+button press - sound soun sound sound sound - image+button press  
Is there a way through the Builder to do it, without the response component to appear after both images and sounds?

Thank you very much in advance!
