Discuss Scratch

ERGGames
New Scratcher
2 posts

Color Touching Color not working?

So I'm making a project. What I have in mind is that white blocks try to smash the blue dot, and when they do, it changes to a backdrop that says “You Lose”. But when I try to use the block, I put in "If is touching Then" (at the bottom, I put the backdrop) and it doesn't work!!! I need help!!!
Scratch_Mapping
Scratcher
100+ posts

Color Touching Color not working?

I'll put this in Scratchblocks for you, to make the script easier to read:
IftouchingBlue?thenswitchbackdroptoYou Lose put this in the "white" sprite
ERGGames
New Scratcher
2 posts

Color Touching Color not working?

But the white blocks aren't a sprite.
Hasanmajid10
Scratcher
100+ posts

Color Touching Color not working?

Whats your project link?
I might be able to help…
deck26
Scratcher
1000+ posts

Color Touching Color not working?

Do you realise that when using the ‘colour touching colour’ block the first colour has to be part of the sprite running the script and the second part of something else?
TheUltimateCoder3279
Scratcher
18 posts

Color Touching Color not working?

I think this works?
foreverscratchblocksifcoloristouching?thensayhifor2secs/scratchblocks
asivi
Scratcher
1000+ posts

Color Touching Color not working?

ERGGames wrote:

So I'm making a project. What I have in mind is that white blocks try to smash the blue dot

ERGGames wrote:

But the white blocks aren't a sprite.
, and when they do, it changes to a backdrop that says “You Lose”. But when I try to use the block, I put in "If is touching Then" (at the bottom, I put the backdrop) and it doesn't work!!! I need help!!!
I would like to see your project, please share it.

Last edited by asivi (Dec. 10, 2016 18:45:31)

RedTerraria
Scratcher
48 posts

Color Touching Color not working?

You're going to have to make make the white and blue dots a sprite.
Put this in the white dot:
whenclickedforeverifcoloristouching?thenbroadcast hide
Make the blue white, then make the orange blue.

Put this in the blue dot:
whenIreceive hidehide
ni2023
New Scratcher
6 posts

Color Touching Color not working?

I have a problem with the same block.
I have a moon lander that when the gold landing legs touch the white moon, it broadcasts a message and hides, and when the gray body touches the white moon, it broadcasts a different message and hides, but nothing's happening. My blocks are: (with the wrong colors of course)

whenIreceive landset (land)to0set (boom)to0repeatuntilland=1orboom=1ifcoloristouching?thenbroadcast land2set landto1hideifcoloristouching?thenset boomto1hide

Last edited by ni2023 (May 3, 2017 22:15:36)

ni2023
New Scratcher
6 posts

Color Touching Color not working?

The lander is a sprite, the moon is part of the backdrop
cs65641
Scratcher
6 posts

Color Touching Color not working?

Hello! I really need help on this scratch project: https://scratch.mit.edu/projects/156547628/ !!
Something that I need help with is the coding because I am trying to get the cat spite to change the backdrop to the mall when it is in backdrop 1. When it gets to the backdrop “mall” the cat should be able to touch the door and exit backdrop “mall” to backdrop 1. Please, I really need help! Thank you!!
ni2023
New Scratcher
6 posts

Color Touching Color not working?

Sorry I forgot to implement the first bit of my comment. The color touching color is not working for me either, I have this code that does not work. It is of a moon lander that when the gold landing legs touch the moon in the background it does one thing but then when the lander body touches it does another. (this has the wrong colors)
whenIreceive landset landto0set destroyto0repeatuntilland=1ordestroy=1ifcoloristouching?thenbroadcast land2set landto1hideifcoloristouching?thenset destroyto1hide

Last edited by ni2023 (May 4, 2017 00:03:23)

ni2023
New Scratcher
6 posts

Color Touching Color not working?

Also cs65641, for the cat's program, just put a forever block around
whenbackdropswitchesto 1iftouching sprite1?thenswitchbackdropto mall
so it looks like
whenbackdropswitchesto 1foreveriftouching sprite1?thenswitchbackdropto 1
ni2023
New Scratcher
6 posts

Color Touching Color not working?

I had another thing before my first post but it keeps deleting and I don't know why.
It said that basically I had a lander and a backdrop with a moon and whenever the gray part of the lander touches the white moon something is supposed to happen and when the gold part touches the white moon some thing else but nothing happens.

Last edited by ni2023 (May 4, 2017 00:16:16)

cs65641
Scratcher
6 posts

Color Touching Color not working?

ni2023, Thank you very much!!!!
ni2023
New Scratcher
6 posts

Color Touching Color not working?

All my posts just came back…
pokerwoka
Scratcher
2 posts

Color Touching Color not working?

my touching color doesn't work
pokerwoka
Scratcher
2 posts

Color Touching Color not working?

If
touching
Blue
?
then
switch
backdrop
to
You Lose






























































































minepie7yt
Scratcher
500+ posts

Color Touching Color not working?

do this instead
iftouchingblue dot?thenswitchbackdroptoyou lose
-Strife-
Scratcher
100+ posts

Color Touching Color not working?

Can you share the project?

Powered by DjangoBB