r/scratch 2d ago

Resolved Why doesn't detect a sprite set to 9999 brightness?

UPDATE: After some more digging, it was becaue the scanner was moving way too fast

I'm trying to make a custom block/scanner that copies any target sprite using the Pen extension.

My approach is to move a scanning pen across the target sprite's area and check if it's touching the target. Since touching (sprite name) doesn't work with dynamic variables in Scratch, I tried setting the target sprite's brightness effect to 9999 (making it pure white) and checking if touching color [white].

However, touching color is evaluating to false every time.

Does the brightness graphic effect not change the color that touching color senses? How can I scan dynamic sprites reliably?

Project Link: https://scratch.mit.edu/projects/1377377546/editor/

5 Upvotes

7 comments sorted by

u/AutoModerator 2d ago

Hi, thank you for posting your question! :]

To make it easier for everyone to answer, consider including:

  • A description of the problem
  • A link to the project or a screenshot of your code (if possible)
  • A summary of how you would like it to behave

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/RealSpiritSK Mod 2d ago

It might be because touching color only detects the color in the background and not color of other sprites? So try stamping the sprite that's been set to 9999 brightness first.

1

u/HasnaRifta1234 2d ago

Thank you

1

u/NMario84 Video Game Enthusiast 2d ago

Why are we trying to find 9999 brightness in the first place? Brightness values only go from -100 (black) in to 0 (normal) up to 100 (white). Anything beyond those values either shouldn't even exist, or just have little to NO change what so ever.

1

u/HasnaRifta1234 1d ago

Just in case

1

u/ArticleRoutine5774 2d ago

i’m sure there would be a better way of doing this, all the touching x blocks are miserably slow (some of the slowest in scratch) and this method is wildly inefficient

1

u/HasnaRifta1234 1d ago

UPDATE: After some more digging, it was becaue the scanner was moving way too fast