How do I simulate painting?

Get help using Construct 2

Post » Mon May 05, 2014 11:37 am

Is there any way to simulate painting on Construct2? The idea is the player needs to paint a sprite with the correct color that is shown on a display and would be better if done by dragging the mouse cursor. Is this possible? If yes, could someone give me an idea of how to do this? Thanks.
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,051

Post » Mon May 05, 2014 3:05 pm

composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Mon May 05, 2014 3:50 pm

Hi @eli0s,

Thanks for the indication. This plugin is really good.

I found another example in this thread that is closest to what I need.

search.php?keywords=CanvasFloodFillDemo.capx&t=64239&sf=msgonly

But I test it and only two colors works and it's not always. Do you know how can I fix it?

Thanks again.
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,051

Post » Mon May 05, 2014 7:27 pm

I see what you mean. I thing there is something wrong, it doesn't work for me either and sometimes it kills the page.

I think you should report this to Pode and R0J0hound, it's totally out of the scope of my knowledge.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Mon May 05, 2014 9:54 pm

The flood fill action seems to hang when there is transparency in the canvas being filled. Also the other color names work as I recall in Firefox. But in chrome they don't seem to be, but using color strings like "rgb(0,255,255)" do work.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Tue May 06, 2014 12:12 am

R0J0hound wrote:The flood fill action seems to hang when there is transparency in the canvas being filled. Also the other color names work as I recall in Firefox. But in chrome they don't seem to be, but using color strings like "rgb(0,255,255)" do work.


Hi R0J0hound. Now is working. Thanks for helping.

How can we check if a sprite is all painted? We can verify or compare the color that was painted to see if it is the right color or the sprite was painted using the same color? Thanks
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,051

Post » Tue May 06, 2014 12:16 am

You could try the canvas.rgbaAt(x,y) expession... or use the blueAt(), redAt() and greenAt() expressions to get the color components to build a color string like "rgb(0,255,255)".
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Tue May 06, 2014 11:08 am

R0J0hound wrote:You could try the canvas.rgbaAt(x,y) expession... or use the blueAt(), redAt() and greenAt() expressions to get the color components to build a color string like "rgb(0,255,255)".


Thanks, R0J0hound,

In this case verify the color, right? But how do I know if the sprite was all painted? Is it possible?
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,051


Return to How do I....?

Who is online

Users browsing this forum: 25games, Ashley, leotardozc, TRMG and 21 guests