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
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

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
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

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
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

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
200
S
51
G
30
Posts: 896
Reputation: 36,494

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
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

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
200
S
51
G
30
Posts: 896
Reputation: 36,494


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests