Change Color Alpha over time

Hi guys,
I want to get my background getting brighter and brighter. To do that I set up under Scene -> Attributes -> Color to white.
I then set up the following behaviors under my actor that I want to get brighter:

-every 1 seconds

self.Color.Alpha -0,1

It simply doesn't work: The only value I can set instead of -0,1 is -1 and that works but that's not what I need.
So is there a way to properly do it?

Best Answer

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You might have better results using Interpolate self.Color.Alpha to 0 with Duration set to 10 seconds.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • ThoPelThoPel GermanyMember, PRO Posts: 184

    Why do you not use the interpolate behavior for color.alpha?

  • Creator97Creator97 Member Posts: 140

    @tatiang Why does it work when you do it? And not when I do it? I have really really really exactly the same. Trust me. I know it works because it does with 1. Weird.
    And yeah I totally forgot about Interpolating. But what is if you want to set Duration to <1? Doesn't work right?

  • jcampanojcampano Member Posts: 14

    When you need to use time <1 use 0.5 or 0.05 (ex) and here works - GameSalad Windows

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Creator97 said:
    tatiang Why does it work when you do it? And not when I do it? I have really really really exactly the same. Trust me. I know it works because it does with 1. Weird.

    Can you post a sample project file where it's not working? It may look the same but actually be different... then again, it's hard to know without seeing screenshots or the file itself.

    And yeah I totally forgot about Interpolating. But what is if you want to set Duration to <1? Doesn't work right?

    You were changing the alpha one tenth per second, which is why I suggested interpolating for 10 seconds. But sure, you can use values less than 1.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Creator97Creator97 Member Posts: 140

    I just realized why game salad is always allowing me just real numbers. Because i used all time , instead of . Damn it...

Sign In or Register to comment.