How do I make a fade with a "trigger" condition..?

Get help using Construct 2

Post » Sun Jul 28, 2013 9:11 pm

Hello all,

Perhaps this is mentioned somewhere else, but I can't find a relevant post and I can't seem to wrap my mind around this problem.

I want a "trigger" condition (you know the ones with the green arrow) to evoke an action continuously, not just once.

Let's say that I want to make a fade out.
I understand how to do it with "when overlap with" for example, you do a "set opacity to self.Opacity - 100 * dt"...

But how can I have the same result if I want to use the "timer" behavior and I want to trigger a fade with an "on timer" condition?
Or with an "on click" with the mouse...?

Adding a sub-event and putting the actions there doesn't do any good, it just triggers once too...

There must be a simple solution around this, I'd really appreciate any help I can get!!!

Thank you,

Elias
composer - multimedia artist
www.eli0s.com/en/
B
65
S
26
G
4
Posts: 1,145
Reputation: 9,572

Post » Sun Jul 28, 2013 9:34 pm

Assuming you don't like how the default Fade behaviour works, you'd use the timer to set a variable, that you are checking (Every tick, for example). If it's set you call the fade code. Reset the variable when your fade is done.
ImageImageImage
B
71
S
20
G
190
Posts: 3,534
Reputation: 108,342

Post » Sun Jul 28, 2013 11:06 pm

@blackhornet,

Oh, thank you so much! I would have never thought this by my self

You are correct, the fade out was just an example, I wanted to understand the logic behind a possible solution that applies to situations that aren't covered with behaviors.

Best regards,

Elias   
composer - multimedia artist
www.eli0s.com/en/
B
65
S
26
G
4
Posts: 1,145
Reputation: 9,572


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests