Constantly Interpolate Colors

Hi guys! First time poster here..
I'm trying to create a progress bar that every 5 seconds interpolates it's 3 colors to a randomly generated color.
The actor has 3 attributes (NewRed,NewBlue,NewGreen). The initial Colors of this actor and it's 3 attributes are (0,0,0) and this is what I have so far:
Rule:
When All of the following conditions:
self.Color.Red==NewRed
self.Color.Blue==NewBlue
self.Color.Green==NewGreen
Then:
Change Atributte NewRed,NewBlue,NewGreen=random(0,1)
Interpolate self.Color.Blue/Red/Green to NewBlue/Red/Green in 5 seconds.
The problem is that the bar actually changes it's color in the first 5 seconds, but afterwards the color remains the same. I'm having some trouble understanding why this happens because after the first 5 seconds, the conditions should be valid (just like they are when the game starts).
Any help would be greatly aprecciated!
Nico
I'm trying to create a progress bar that every 5 seconds interpolates it's 3 colors to a randomly generated color.
The actor has 3 attributes (NewRed,NewBlue,NewGreen). The initial Colors of this actor and it's 3 attributes are (0,0,0) and this is what I have so far:
Rule:
When All of the following conditions:
self.Color.Red==NewRed
self.Color.Blue==NewBlue
self.Color.Green==NewGreen
Then:
Change Atributte NewRed,NewBlue,NewGreen=random(0,1)
Interpolate self.Color.Blue/Red/Green to NewBlue/Red/Green in 5 seconds.
The problem is that the bar actually changes it's color in the first 5 seconds, but afterwards the color remains the same. I'm having some trouble understanding why this happens because after the first 5 seconds, the conditions should be valid (just like they are when the game starts).
Any help would be greatly aprecciated!
Nico
Comments
What you'll want to do it
(random(0,100)/100)
that should give a much better range.
http://cookbook.gamesalad.com/#question=4e29b1e9db04ec4d83000179
just instead of having change attribute: self.change.Color to (self.change.color+1)%3
have change attribute self.change.Color to random(0,2)