How do I replace a specific color?

Get help using Construct 2

Post » Thu Mar 27, 2014 6:52 am

http://oi59.tinypic.com/10mmzok.jpg

The problem still persists.

combining the 2 events into 1 event results in the same problem (only light red is being replaced).
B
16
S
7
Posts: 301
Reputation: 2,726

Post » Thu Mar 27, 2014 7:37 am

You're still setting the parameters for the first "ReplaceColor" on the second event
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Thu Mar 27, 2014 9:19 am

ok. thanks. I fixed it.

There's something weird happening. Isn't a replace color supposed to replace all parts of the said color into the new color? there are some pixels of that said color not being replaced. I went into the image editor to check the RGB values of the color parts not being replaced and their RGB values are the same as the ones I put in the event.

Any idea on this issue?
B
16
S
7
Posts: 301
Reputation: 2,726

Post » Thu Mar 27, 2014 5:56 pm

If you set the 3 first values of the ReplaceColor correctly, and Tolerance is 1, yes it should replace every pixel of that one color entirely.
If you're saving your image as a jpeg than compression is the problem
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Fri Mar 28, 2014 7:05 am

I'm aware of the jpeg effect on sprites. I also checked the RGB values of the pixels not being recolored. They are the same as the pixels being recolored.

I just checked my tolerance. It is indeed 1. I read the description of tolerance parameter and it says its value is from 0 -100, so I tried different values. The higher the value (say 100), it affects the other colors not specified as well. So the best possible value I tried that didn't recolor the colors not specified was 30. It still doesn't recolor some pixels (only sometimes).

Basically, I keep moving my player (walking, jumping, etc.) in my platform game. Sometimes all red are recolored, sometimes there are pixels left not replaced. I think this is either it can't keep up with something graphics related just for my computer (I'm not familiar with WebGL and what could possibly affect it) or it is really a bug.

What do you think?
B
16
S
7
Posts: 301
Reputation: 2,726

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests