Discuss Scratch

lwell72
Scratcher
100+ posts

Scanning For A Curtian Colour HELP?!

I have a game where it scans a sprite and re-draws it using pen. I am having some difficulties scanning for a curtain colour. please help me. tell me what to do of remix thanks!
https://scratch.mit.edu/projects/219835770/#editor
Have An awesome Day!
deck26
Scratcher
1000+ posts

Scanning For A Curtian Colour HELP?!

You're not adding anything to the colour list.
lwell72
Scratcher
100+ posts

Scanning For A Curtian Colour HELP?!

deck26 wrote:

You're not adding anything to the colour list.
I know but when the ColourItem goes through all the colours it just keeps going
deck26
Scratcher
1000+ posts

Scanning For A Curtian Colour HELP?!

lwell72 wrote:

deck26 wrote:

You're not adding anything to the colour list.
I know but when the ColourItem goes through all the colours it just keeps going
No, I mean you don't have any code that adds data to the list.

Never use a forever block in a custom block with no screen refresh even if you have a ‘stop this script’ in there. A custom block can only take advantage of the no screen refresh if it completes quickly enough and you can't guarantee that with a forever loop.

You also have a forever loop setting x in Cool as well as the custom blocks trying to change x which is likely to lead to conflicts.
lwell72
Scratcher
100+ posts

Scanning For A Curtian Colour HELP?!

But when I do this it does not work.

foreverrepeatuntiltouchingcolorColour?changeColourby1addColourtoColour

Oops that colour variable is ment to be a variable not a list.

Last edited by lwell72 (May 4, 2018 06:18:37)

deck26
Scratcher
1000+ posts

Scanning For A Curtian Colour HELP?!

A full colour scanner covering 32 x 32 x 16 colours pixel by pixel is very slow and not really feasible - you certainly don't want to continue the loops oncce you've found a match. A better solution is to use a full screen costume initially to scan the whole screen for colours which are present to create a sub-list of colours and then only scan pixel by pixel for those colours.
lwell72
Scratcher
100+ posts

Scanning For A Curtian Colour HELP?!

deck26 wrote:

A full colour scanner covering 32 x 32 x 16 colours pixel by pixel is very slow and not really feasible - you certainly don't want to continue the loops oncce you've found a match. A better solution is to use a full screen costume initially to scan the whole screen for colours which are present to create a sub-list of colours and then only scan pixel by pixel for those colours.
I don’t really understand how that works. Can you edit the remix you made if that’s possible?
airallineed
New Scratcher
2 posts

Scanning For A Curtian Colour HELP?!

I don't really understand what you trying to do? Do you want a color picker function like for example on https://www.colorcodepicker.com ? Like “storing” a color?

Thanks!

Last edited by airallineed (May 5, 2018 08:52:59)

Powered by DjangoBB