Changing Layer Opacity

Just started using Construct 2? Post your questions here

Post » Tue Nov 29, 2016 6:49 pm

Hello everyone,

I've searched around but found nothing specifically about this problem I'm having: I have a game with 3 layers, and when I tap screen, I want the top layer to fade out, but no matter what I do (while, for, every x seconds, etc...), the layer disappears at once. Is there something I'm missing?

Thanks in advance
B
9
S
3
Posts: 40
Reputation: 780

Post » Tue Nov 29, 2016 6:53 pm

You have to decrease the opacity value over time. How are you doing that? Typically done Every tick until you reach 0.
ImageImageImage
B
71
S
21
G
231
Posts: 3,688
Reputation: 129,352

Post » Tue Nov 29, 2016 7:01 pm

I've been trying like this:

Image
B
9
S
3
Posts: 40
Reputation: 780

Post » Tue Nov 29, 2016 7:19 pm

http://www.blackhornettechnologies.com/Construct2Stuff/FadeLayer.capx

First, you can't bury your fade inside the touch. That code is executed just once on the tap. Don't mix the layer names and numbers. That might be another problem.
ImageImageImage
B
71
S
21
G
231
Posts: 3,688
Reputation: 129,352

Post » Wed Nov 30, 2016 11:33 am

Thanks. It didn't occur to me to use Grouped Events. Silly me 8)
B
9
S
3
Posts: 40
Reputation: 780


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests