# Use a variable list/array for trigger\_flag

**URL:** <https://mworks.discourse.group/t/use-a-variable-list-array-for-trigger-flag/398>\
**Category:** Support\
**Created:** [August 9, 2017, 1:10pm UTC](https://mworks.discourse.group/t/use-a-variable-list-array-for-trigger-flag/398 "2017-08-09T13:10:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 9, 2017, 1:10pm UTC](https://mworks.discourse.group/t/use-a-variable-list-array-for-trigger-flag/398/1 "2017-08-09T13:10:34Z")

</div>

Hello Chris,  
I am trying to use a variable list in the trigger flags of multiple fixation dots (in the same stimuli group), but it doesn’t work. What I did is create list variable and put the list elements in the fixation dots’ trigger flag; so the trigger\_flage will be set to target\_fix[n]. The code is accepted in the client, so no syntax errors, but the variable list doesn’t change when the monkey is looking at any fixation dot.  
Alseo,I have read that the index of the list starts with 0, does this mean than x[0] has the first element of the list?  
Cheers,  
Beshoy

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 9, 2017, 1:47pm UTC](https://mworks.discourse.group/t/use-a-variable-list-array-for-trigger-flag/398/2 "2017-08-09T13:47:36Z")

</div>

Hi Beshoy,

> What I did is create list variable and put the list elements in the fixation dots’ trigger flag; so the trigger\_flag will be set to target\_fix[n].

That doesn’t work. You need a different variable for each trigger\_flag.

> I have read that the index of the list starts with 0, does this mean than x[0] has the first element of the list?

Correct.

Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 9, 2017, 3:22pm UTC](https://mworks.discourse.group/t/use-a-variable-list-array-for-trigger-flag/398/3 "2017-08-09T15:22:06Z")

</div>

Hello Chris,

Thanks for the reply; that’s the information I was looking for.

Cheers,  
Beshoy

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 19, 2022, 9:55pm UTC](https://mworks.discourse.group/t/use-a-variable-list-array-for-trigger-flag/398/4 "2022-07-19T21:55:19Z")

</div>


