How do I make a settings button options fade in and out?

Just started using Construct 2? Post your questions here

Post » Tue Jun 16, 2015 5:53 am

I'm having trouble making this settings button open options that fade in when the settings button is touched and fade out, when the settings button is touched again. The problem is that I have implemented a technique for the buttons to grow (A tutorial from a fellow Constructor) when in touch and then this causes the buttons to quickly fade in and then back out instantly!

So then I made a "Back button" Which on Tap would fade out the buttons, but using a "back" button for fade in settings isn't really what I'm looking for, even though that was a pseudo solution ..... So then I added a Instance Variable thinking that would solve the problem, and now I'm stuck.

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

Post » Tue Jun 16, 2015 11:05 pm

Your issue is that it processes so fast that when you set SettingsTrigger to 1, it is being 'touched' so it starts the 2nd fade.

Instead of checking for SettingTrigger = 1, check for the Opacity of one of the buttons to be 0. This way it will only trigger if the
options are hidden.

Instead of checking for SettingTrigger = 0, check for the Opacity of one of the buttons to be 100. This will only trigger once the options are visible. You could also check for >0 if you wanted to allow them to close them before they are 'fully open'.

Hope that helps. I can send it to you if you like.
B
42
S
16
G
3
Posts: 169
Reputation: 4,383

Post » Tue Jun 16, 2015 11:37 pm

Can you please send it to me?

Unfortunately I'm not home and can't do it currently.
Risk Rocket now available on Google Play
Image
B
36
S
15
G
6
Posts: 337
Reputation: 6,300

Post » Wed Jun 17, 2015 3:21 am

B
42
S
16
G
3
Posts: 169
Reputation: 4,383

Post » Thu Jun 18, 2015 1:17 am

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 3 guests