Change Color Alpha over time
Creator97
Member Posts: 140
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
-
tatiang Posts: 11,949
Like this?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
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
Why do you not use the interpolate behavior for color.alpha?
@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?
When you need to use time <1 use 0.5 or 0.05 (ex) and here works - GameSalad Windows
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.
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
I just realized why game salad is always allowing me just real numbers. Because i used all time , instead of . Damn it...