How do I change random colors?

Get help using Construct 2

Post » Mon Nov 16, 2015 3:29 am

hi to all

it is possible to fill the canvas color/gradient to a random one?
i added this formula for a vertial gradient, but its not working.

random"rgb(125,25,45)"
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612

Post » Mon Nov 16, 2015 3:36 am

I'm not sure what you are trying to do..
Random works with numbers and not strings..
The expression is random() and not random""
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

Post » Mon Nov 16, 2015 4:11 am

rgb(random(255), random(255), random(255))

But, that just sets the canvas to a random solid color.

This is just a guess, but one solution might be to create a grey gradient background in a paint program and then, to get random color you can add an 'effect' like 'color' to the sprite and randomize it's parameter. I haven't experimented with it though.
B
15
S
5
Posts: 124
Reputation: 1,687

Post » Mon Nov 16, 2015 5:11 am

i found a better solution the canvas plugin i added a gradient :D and animated the gradients with the fade-in / fade-out plugin every time the player reach a certain score.
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests