Constantly fading background

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

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2015

    Constrain self.color.alpha to 0.5 *sin(self.time *200)+0.5

    The '200' controls the speed, change it to what you need.

  • rooskienzrooskienz Member Posts: 2

    Thank you Socks!

    I'm very new to GS, where do I write the code you suggested?

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2015

    @rooskienz said:
    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.

  • SocksSocks London, UK.Member Posts: 12,822

    Example file attached:

Sign In or Register to comment.