# Set Array Element not working right.

**URL:** <https://forums.unrealengine.com/t/set-array-element-not-working-right/92153>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [May 15, 2017, 12:18pm UTC](https://forums.unrealengine.com/t/set-array-element-not-working-right/92153 "2017-05-15T12:18:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rogarfuryfist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rogarfuryfist](https://forums.unrealengine.com/u/Rogarfuryfist)\
**Post date:** [May 15, 2017, 12:18pm UTC](https://forums.unrealengine.com/t/set-array-element-not-working-right/92153/1 "2017-05-15T12:18:37Z")

</div>

Sorry if this problem has been answered elsewhere, searching the forum didn’t come up with a answer for me.

https://.dropbox.com/s/5th8jrogj9sz3fz/Screenshot%202017-05-15%2014.10.51.png?dl=0

For some reason, when I activate this function, the value targeted from the array isn’t changing.

---

<div class="post-metadata">

**Author:** ![StarfireDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StarfireDev](https://forums.unrealengine.com/u/StarfireDev)\
**Post date:** [May 15, 2017, 4:25pm UTC](https://forums.unrealengine.com/t/set-array-element-not-working-right/92153/2 "2017-05-15T16:25:56Z")

</div>

> [@Rogarfuryfist;709245](#):
>
> Sorry if this problem has been answered elsewhere, searching the forum didn’t come up with a answer for me.
> 
> https://.dropbox.com/s/5th8jrogj9sz3fz/Screenshot%202017-05-15%2014.10.51.png?dl=0
> 
> For some reason, when I activate this function, the value targeted from the array isn’t changing.

You are making a **temporary** array. Changing its value implies changing a temporary variable.

I believe what you want is to change the value of the referenced variable, from a list. There’s lot of different ways to handle this, one I suggest is creating a struct with the Skill Name and a float value and declare an array (inside the class variables) containing each of the skills you want. Access the specific skill you want and set from a persistent variable, not a temporary one.

You can handle this in lots of manners, but keep in mind that you can’t store all of them in a temporary variable and access the specific index that you are NOT referencing the variable you passed to this array, it’s just a copy of the previous variable.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9f47de28](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9f47de28](https://forums.unrealengine.com/u/anonymous_user_9f47de28)\
**Post date:** [May 15, 2017, 6:44pm UTC](https://forums.unrealengine.com/t/set-array-element-not-working-right/92153/3 "2017-05-15T18:44:52Z")

</div>

If you wanna change a specific variable based on an integer input, I think you might look into a switch (or, dunno if a select node works with int).
