# Link Boolean to array index?

**URL:** <https://forums.unrealengine.com/t/link-boolean-to-array-index/422371>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, Blueprint, question\
**Created:** [April 11, 2018, 1:03pm UTC](https://forums.unrealengine.com/t/link-boolean-to-array-index/422371 "2018-04-11T13:03:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_5e6636f9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5e6636f9](https://forums.unrealengine.com/u/anonymous_user_5e6636f9)\
**Post date:** [April 11, 2018, 1:03pm UTC](https://forums.unrealengine.com/t/link-boolean-to-array-index/422371/1 "2018-04-11T13:03:19Z")

</div>

How do I link the picture 1 and picture 2 Bools to the array indexes. For instance if picture 1 bool is true than that is linked to array index [0]. So only array index [0] will be set hidden?

 ![237098-forumpostimage1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/f/8/9f8b7eb3e1905fe89982602b2d2e8dc4c5ffbbdd.png)

---

<div class="post-metadata">

**Author:** ![ThompsonN13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThompsonN13](https://forums.unrealengine.com/u/ThompsonN13)\
**Post date:** [April 11, 2018, 2:11pm UTC](https://forums.unrealengine.com/t/link-boolean-to-array-index/422371/2 "2018-04-11T14:11:39Z")

</div>

i would use two arrays of the same length to store your information or use a struct. in the case of using two arrays you just need to make the indexes match so pic 1 in the actor array and in the bool array would both be index 0. if you use a struct then you could make them into one index in the same array that stores both the actor and the bool values.

below is a example of how you could accomplish this with two arrays.

 ![237099-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/5/80569e155392dcb7fc8381a025017f0fe291629f.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5e6636f9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5e6636f9](https://forums.unrealengine.com/u/anonymous_user_5e6636f9)\
**Post date:** [April 12, 2018, 8:23pm UTC](https://forums.unrealengine.com/t/link-boolean-to-array-index/422371/3 "2018-04-12T20:23:34Z")

</div>

Thanks for your reply. I have spent time working through the example and I am going in the right direction.
