How do I make this laser fade out, wait, and fade back in?

Just started using Construct 2? Post your questions here

Post » Wed May 27, 2015 6:58 am

I've got a laser that has a wait time for it to fade out. Once it fades out, it starts fading in the instant it ends fading out. How do I have a pause before it fades back in? This is a loop, so it does this constantly. Wait, fade out, wait, fade in, and repeat.

https://www.dropbox.com/s/utvjq94uzp0vs ... .capx?dl=0
Risk Rocket now available on Google Play
Image
B
36
S
15
G
6
Posts: 337
Reputation: 6,300

Post » Wed May 27, 2015 7:11 am

easiest way (giving you the most control) would be to create two fade behaviours, one for fade in and one for fade out and use timer-behaviour to start them..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 27, 2015 7:17 am

you can use sine behavior > opacity and tweak the intensity and the period :) will make it loop fade in out continuously :) Download


or you can try this capx that uses fadeout behavior, and simply 1 event that restarts it when the fadeout ends Download
B
70
S
20
G
67
Posts: 1,316
Reputation: 42,305

Post » Wed May 27, 2015 8:42 pm

Wait a sec. I'm still stuck. I've added two fade behaviors to the laser, one for fade out, and fade in. Just as you said.
The fade out works fine, since it waits and then fades but it doesn't come back.... Even though I have it set to fade back in after a set time and with logical conditions...

https://www.dropbox.com/s/96wthe3vs5je2 ... .capx?dl=0
Risk Rocket now available on Google Play
Image
B
36
S
15
G
6
Posts: 337
Reputation: 6,300

Post » Thu May 28, 2015 11:36 am

Why did you make event 3 a sub event of event 2 ?
It cannot be executed since the default required condition is for the laser's opacity to be >= 100 which is false from the moment the fade out starts.

Simply change the level of event 3 and you don't even need to check that opacity is = 0.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,319
Reputation: 87,487

Post » Thu May 28, 2015 11:57 am

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu May 28, 2015 8:03 pm

Got it.

I keep learning something new from this engine! Thank you.
Risk Rocket now available on Google Play
Image
B
36
S
15
G
6
Posts: 337
Reputation: 6,300


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest