how do I change Background Color in an Event

Get help using Construct 2

Post » Tue Jan 03, 2012 10:32 pm

Hi!

I couldn't find the solution of that question on the Forum.

anyone knows if it's possible ?

I want to change the color background.
Do I have to use an Image ?

Thanks!


In construct2...
B
12
S
2
G
5
Posts: 73
Reputation: 3,570

Post » Tue Jan 03, 2012 10:35 pm

You can change the bg color in the layer properties. In CC it's in the layout properties..took me a while to figure that one out lol.
Image
B
235
S
27
G
13
Posts: 1,784
Reputation: 18,304

Post » Wed Jan 04, 2012 12:27 am

It's not possible in an event.
But you can use the Canvas plugin, you put it in the lowest layer, make it the size of the layout and fill it with the color you want at runtime.
B
63
S
22
G
14
Posts: 1,482
Reputation: 16,432

Post » Wed Jan 04, 2012 4:43 am

Cool, thx!

The Canvas plugin does what I want...

But, it also divide my FPS by 2!!

So... can't really use it.

Thx anyway !
B
12
S
2
G
5
Posts: 73
Reputation: 3,570

Post » Wed Jan 04, 2012 11:37 am

hmm send the capx, it might be a size thingy, the size of the canvas texture could be 1*1 px but you could stretch it to fit the layout.
And setting a pixel shouldn't drop fps :D
B
63
S
22
G
14
Posts: 1,482
Reputation: 16,432

Post » Fri Jan 06, 2012 2:23 pm

Ooh!

I made it the size of my Window.
That must be why!
B
12
S
2
G
5
Posts: 73
Reputation: 3,570

Post » Wed Aug 01, 2012 12:25 am

Hmm, using that thought, you could make a 1x1 sprite, stretch it to fit the screen, and not use the add on. Right?
B
220
S
58
G
32
Posts: 900
Reputation: 39,049

Post » Wed Aug 01, 2012 12:50 am

@Paradox: yes.
And having different animation frames for different colors.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
270
S
98
G
70
Posts: 7,266
Reputation: 75,632

Post » Wed Aug 01, 2012 1:55 am

Heh, that's exactly what I'm working on now. Each level has it's own color, so each frame corresponds to the level number. it doesn't even require another variable.

Actually, I already have a transparent PNG gradient with texture stretching to fit. The color layered behind it will make it look like different backgrounds each level with very little extra download time.
B
220
S
58
G
32
Posts: 900
Reputation: 39,049


Return to How do I....?

Who is online

Users browsing this forum: Fib, imhotep22, raulcg1981, shukra and 1 guest