How do I Fade bg to different colors as the game progresses

Get help using Construct 2

Post » Tue Oct 13, 2015 6:03 pm

When the players score reaches a certain number I want the background to fade from Green to Blue, then when their score another number, I want the background to fade from Blue to Red.. etc

Right now I have created a background object with the Fade behavior, and I have set the frames to the different colors, I've also been changing the background color of the layer but I am bit mixed up about the order to do things in.

Is there a simpler way to do this?
B
86
S
28
G
10
Posts: 95
Reputation: 10,275

Post » Tue Oct 13, 2015 9:53 pm

You can set a background layer as non transparent and then System -> Set layer backgroud color. I haven't tried that, and I'm not sure how it will affect the performance, but it gives you a kind of freedom with the dynamic background color.
ImageImageImage
B
31
S
19
G
82
Posts: 1,037
Reputation: 46,203

Post » Wed Oct 14, 2015 4:56 am

Okay,

So what would the order of the logic be?

Image
Sky starts off as light blue (frame 0)
//22 Sky is Pink (frame 1)
//23 Sky is Black (frame 2)
//24 Sky is Gray (frame 3)

This somewhat works but makes something weird happen. The left half of the game window background fades to the proper color but the right half transitions to the proper color instantly.
B
86
S
28
G
10
Posts: 95
Reputation: 10,275

Post » Thu Oct 15, 2015 6:15 pm

bump
B
86
S
28
G
10
Posts: 95
Reputation: 10,275

Post » Thu Oct 15, 2015 6:58 pm

why not use a tiled background object?
all it would have to be is 1px by 1 px.. :)
scale it to the project size, and use the fade behaviour on it after creating a new one in a new colour..
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


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests