Constantly fading background
rooskienz
Member Posts: 2
Hi,
just starting with GS. I want the background to fade out and then fade back in forever, how to do that using behaviours?
Cheers!
Answers
Constrain self.color.alpha to 0.5 *sin(self.time *200)+0.5
The '200' controls the speed, change it to what you need.
Thank you Socks!
I'm very new to GS, where do I write the code you suggested?
You make an actor - place a constrain behaviour in that actor - and then place the code in that constrain behaviour . . . . . remember to select 'self.time' and 'self.color.alpha' from the pulldown menu rather than typing it in.
Example file attached: