Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Touching (color)? blocks stop working when I switch to/from fullscreen
- Ironisgold
-
Scratcher
17 posts
Touching (color)? blocks stop working when I switch to/from fullscreen
I spent forever trying to figure out what was happening and I think I finally got it. For some reason every time I go into or exit full screen while the project is running the touching (color)? blocks stop working until I stop the project and start it again. When I say they don't work what I mean specifically is that they always return false no matter what.
It's not an issue with me checking for the wrong color because I brute forced and checked for all 16 million colors and all of them returned false. Also because it works fine up until I switch to/from fullscreen.
Is there a fix for this? In case it matters I am using Scratch through Google Chrome on a Lenovo Chromebook
Example project:
https://scratch.mit.edu/projects/964069096/
It's not an issue with me checking for the wrong color because I brute forced and checked for all 16 million colors and all of them returned false. Also because it works fine up until I switch to/from fullscreen.
Is there a fix for this? In case it matters I am using Scratch through Google Chrome on a Lenovo Chromebook
Example project:
https://scratch.mit.edu/projects/964069096/
Last edited by Ironisgold (Feb. 9, 2024 20:03:15)
- Malicondi
-
Scratcher
1000+ posts
Touching (color)? blocks stop working when I switch to/from fullscreen
I spent forever trying to figure out what was happening and I think I finally got it. For some reason every time I go into or exit full screen while the project is running the touching (color)? blocks stop working until I stop the project and start it again. When I say they don't work what I mean specifically is that they always return false no matter what.Could you share the project you are working on which the touching color boolean doesn't work? I just tested doing the exact same thing you did (yes I brute forced all 16.7m colors) and it worked fine.
It's not an issue with me checking for the wrong color because I brute forced and checked for all 16 million colors and all of them returned false. Also because it works fine up until I switch to/from fullscreen.
Is there a fix for this? In case it matters I am using Scratch through Google Chrome on a Lenovo Chromebook
- yadayadayadagoodbye
-
Scratcher
1000+ posts
Touching (color)? blocks stop working when I switch to/from fullscreen
In full screen, the pixels are more precise, thus, it is sometimes possible for a pixel which exists in full screen to not exist in small screen. Thus, sometimes, when the sprite used to be touching a color, when you exit full screen, the pixel containing that colour dissapears, and suddenly the sprite isn;'t touching that color anymore
atleast I think thats the issue
atleast I think thats the issue
Last edited by yadayadayadagoodbye (Feb. 9, 2024 19:45:46)
- Malicondi
-
Scratcher
1000+ posts
Touching (color)? blocks stop working when I switch to/from fullscreen
In full screen, the pixels are more precise, thus, it is sometimes possible for a pixel which exists in full screen to not exist in small screen. Thus, sometimes, when the sprite used to be touching a color, when you exit full screen, the pixel containing that colour dissapears, and suddenly the sprite isn;'t touching that color anymorethis simply cannot be the issue as they said the tested every possible color, and even if a sprite is only touching an empty backdrop it still says touching color as true.
edit: (because it registers the backdrop as ‘white’)
Last edited by Malicondi (Feb. 9, 2024 19:47:50)
- Ironisgold
-
Scratcher
17 posts
Touching (color)? blocks stop working when I switch to/from fullscreen
I spent forever trying to figure out what was happening and I think I finally got it. For some reason every time I go into or exit full screen while the project is running the touching (color)? blocks stop working until I stop the project and start it again. When I say they don't work what I mean specifically is that they always return false no matter what.Could you share the project you are working on which the touching color boolean doesn't work? I just tested doing the exact same thing you did (yes I brute forced all 16.7m colors) and it worked fine.
It's not an issue with me checking for the wrong color because I brute forced and checked for all 16 million colors and all of them returned false. Also because it works fine up until I switch to/from fullscreen.
Is there a fix for this? In case it matters I am using Scratch through Google Chrome on a Lenovo Chromebook
I'd like to but the project isn't ready to be shared yet unfortunately and I'd really like to avoid sharing it. Do you use the same computer and browser as me? Maybe that's somehow the issue?
- Ironisgold
-
Scratcher
17 posts
Touching (color)? blocks stop working when I switch to/from fullscreen
I spent forever trying to figure out what was happening and I think I finally got it. For some reason every time I go into or exit full screen while the project is running the touching (color)? blocks stop working until I stop the project and start it again. When I say they don't work what I mean specifically is that they always return false no matter what.Could you share the project you are working on which the touching color boolean doesn't work? I just tested doing the exact same thing you did (yes I brute forced all 16.7m colors) and it worked fine.
It's not an issue with me checking for the wrong color because I brute forced and checked for all 16 million colors and all of them returned false. Also because it works fine up until I switch to/from fullscreen.
Is there a fix for this? In case it matters I am using Scratch through Google Chrome on a Lenovo Chromebook
Wait I'll make a new project and see if I can reproduce it and I will share that if it still happens
- Malicondi
-
Scratcher
1000+ posts
Touching (color)? blocks stop working when I switch to/from fullscreen
I'd like to but the project isn't ready to be shared yet unfortunately and I'd really like to avoid sharing it. Do you use the same computer and browser as me? Maybe that's somehow the issue?I did test this on my lenovo chromebook and I always use google chrome for scratch, and i could not reproduce the issue.
You can always share the project on a test acc, and being able to see the project will help as it will allow me to check the code to see if the problem is there.
- Ironisgold
-
Scratcher
17 posts
Touching (color)? blocks stop working when I switch to/from fullscreen
I'd like to but the project isn't ready to be shared yet unfortunately and I'd really like to avoid sharing it. Do you use the same computer and browser as me? Maybe that's somehow the issue?I did test this on my lenovo chromebook and I always use google chrome for scratch, and i could not reproduce the issue.
You can always share the project on a test acc, and being able to see the project will help as it will allow me to check the code to see if the problem is there.
Here I was able to reproduce it. It seems like it also has to do with running without screen refresh maybe
https://scratch.mit.edu/projects/964069096/
- Malicondi
-
Scratcher
1000+ posts
Touching (color)? blocks stop working when I switch to/from fullscreen
Here I was able to reproduce it. It seems like it also has to do with running without screen refresh maybeOk, so the problem is because your sprite is 1x1 pixels size, scratch is weird and sometimes erases or doesn't show pixels. This happens most often in bitmap, and in vector, it blurs the edges of some objects. This is not something you can fix, other than by changing the size to be a bit bigger (2x2 should always work, 4x4 might be a bit better).
https://scratch.mit.edu/projects/964069096/
Last edited by Malicondi (Feb. 9, 2024 20:05:01)
- Ironisgold
-
Scratcher
17 posts
Touching (color)? blocks stop working when I switch to/from fullscreen
In full screen, the pixels are more precise, thus, it is sometimes possible for a pixel which exists in full screen to not exist in small screen. Thus, sometimes, when the sprite used to be touching a color, when you exit full screen, the pixel containing that colour dissapears, and suddenly the sprite isn;'t touching that color anymore
atleast I think thats the issue
I will say you were somewhat close to the correct answer. instead of the colors in the background disapearing however it was the sprite itself which was so small it would disappear and no longer detect anything. thanks for the help!
- Ironisgold
-
Scratcher
17 posts
Touching (color)? blocks stop working when I switch to/from fullscreen
Here I was able to reproduce it. It seems like it also has to do with running without screen refresh maybeOk, so the problem is because your sprite is 1x1 pixels size, scratch is weird and sometimes erases or doesn't show pixels. This happens most often in bitmap, and in vector, it blurs the edges of some objects. This is not something you can fix, other than by changing the size to be a bit bigger (2x2 should always work, 4x4 might be a bit better).
https://scratch.mit.edu/projects/964069096/
yep looks like you're right. thats so weird that it only happens when you switch. thanks for the help!
- Discussion Forums
- » Help with Scripts
-
» Touching (color)? blocks stop working when I switch to/from fullscreen


