# Turn on light that changes color.

**URL:** <https://forums.unrealengine.com/t/turn-on-light-that-changes-color/47957>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [November 19, 2015, 11:03pm UTC](https://forums.unrealengine.com/t/turn-on-light-that-changes-color/47957 "2015-11-19T23:03:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_36464087](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_36464087](https://forums.unrealengine.com/u/anonymous_user_36464087)\
**Post date:** [November 19, 2015, 11:03pm UTC](https://forums.unrealengine.com/t/turn-on-light-that-changes-color/47957/1 "2015-11-19T23:03:01Z")

</div>

Hi, I’m fairly new to unreal…

Anyways I’m trying to create a light where every time I turn it on it changes color(in this case, when I press B it turns on to 1 of 3 colors I have predetermined),then when I turn it off and on it goes to the next color.

Thanks I’m in advance.

---

<div class="post-metadata">

**Author:** ![ZoltanJr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZoltanJr](https://forums.unrealengine.com/u/ZoltanJr)\
**Post date:** [November 20, 2015, 4:34am UTC](https://forums.unrealengine.com/t/turn-on-light-that-changes-color/47957/2 "2015-11-20T04:34:57Z")

</div>

Create an array of colours for your light with 3 values in it.

With your switch use a random int in range to do your GET value on the array, or just do a ++ if you want to go in order.

Set the colour of the light to be the value of the chosen array item.
