Object in mid-fade?

Get help using Construct 2

Post » Wed Nov 21, 2012 8:59 pm

Is there a way to know when an object is currently fading in or out? I know I can catch it when the fade is complete (only fade out, not in?), but I'd like to know when it's in mid-fade.

When I click a certain object, I want another object to either fade in or out. It works ok, but if you click again before the first fade is finished, it keeps restarting which doesn't look very good. I'd like to wait for the fade to finish before another click is allowed. I know you can catch when a fade out is finished, but not fade in apparently. If you could catch fade in finished, then I could set a boolean to true when the object is clicked and then set it to false when the fade finishes. But I can't do that because I don't know how to work out when fade in has completed.
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Thu Nov 22, 2012 12:06 am

Maybe you could use the objects opacity? Objects have opacity 0 to 100, so you could use the object condition opacity = 100 to test for fade in.
B
5
Posts: 12
Reputation: 909

Post » Thu Nov 22, 2012 12:50 am

Ah of course, that's perfect because it tests either way. I only want the click to register if the fade is complete in either direction (i.e totally opaque or invisible), so I can just test for any mid-range opacity. Only just noticed you can test for opacity, thanks :)
B
25
S
5
G
3
Posts: 446
Reputation: 5,633


Return to How do I....?

Who is online

Users browsing this forum: Radulepy and 5 guests