# States - animation

**URL:** https://forum.kirupa.com/t/states-animation/323502
**Category:** programming
**Created:** [July 4, 2011, 7:09pm UTC](https://forum.kirupa.com/t/states-animation/323502 "2011-07-04T19:09:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mandelmassa](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@mandelmassa](https://forum.kirupa.com/u/mandelmassa)
#### Post date: [July 4, 2011, 7:09pm UTC](https://forum.kirupa.com/t/states-animation/323502/1 "2011-07-04T19:09:44Z")

</div>

Hi again.  
I have a grid with 3 different images that i made 3 different states for with alpha settings to 100% over each state and vice vera for the other 2 if the state is not current for the specific image,

state1  
image 1 = 100%  
image 2 = 0%  
image 3 = 0%

state2  
image 1 = 0%  
image 2 = 100%  
image 3 = 0%

state3  
image 1 = 0%  
image 2 = 0%  
image 3 = 100%

I´m not sure how to make my state group react to my global variable that I want to change those states with.

when i change the value of my variable I want it to shift state. variable can be from 0-2  
(0= state1 or 1=state2 or 2=state3)

how do I do this.

regards ./ mandel
