Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Colour is touching Sprite Question
- Sonickyle
-
1000+ posts
Colour is touching Sprite Question

Would this work? It doesn't seem to…
- nXIII
-
1000+ posts
Colour is touching Sprite Question
It's casting the boolean (true/false) to a number (1/0) and then interpreting that number as a color (really dark red/black). So it might work, but it's probably not what you intended to do.
- Sonickyle
-
1000+ posts
Colour is touching Sprite Question
So the <touching {\/}?> sensor doesn't produce an Boolean, but a colour value? It's casting the boolean (true/false) to a number (1/0) and then interpreting that number as a color (really dark red/black). So it might work, but it's probably not what you intended to do.
BTW, would there be a workaround for this?
Last edited by Sonickyle (Feb. 16, 2013 00:20:14)
- nXIII
-
1000+ posts
Colour is touching Sprite Question
Wouldn't <<color () is touching (color of sprite)> and <touching (sprite)>> work?
<touching ()> produces a boolean value, but <color () is touching ()> expects a color value so it tries to turn the boolean into a color value.
<touching ()> produces a boolean value, but <color () is touching ()> expects a color value so it tries to turn the boolean into a color value.
Last edited by nXIII (Feb. 16, 2013 01:26:16)
- Sonickyle
-
1000+ posts
Colour is touching Sprite Question
Ah, thanks. Wouldn't <<color () is touching (color of sprite)> and <touching (sprite)>> work?
<touching ()> produces a boolean value, but <color () is touching ()> expects a color value so it tries to turn the boolean into a color value.

- Discussion Forums
- » Help with Scripts
-
» Colour is touching Sprite Question