Discuss Scratch

Sonickyle
Scratcher
1000+ posts

Colour is touching Sprite Question


Would this work? It doesn't seem to…
nXIII
Scratcher
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
Scratcher
1000+ posts

Colour is touching Sprite Question

nXIII wrote:

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.
So the <touching {\/}?> sensor doesn't produce an Boolean, but a colour value?
BTW, would there be a workaround for this?

Last edited by Sonickyle (Feb. 16, 2013 00:20:14)

nXIII
Scratcher
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.

Last edited by nXIII (Feb. 16, 2013 01:26:16)

Sonickyle
Scratcher
1000+ posts

Colour is touching Sprite Question

nXIII wrote:

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.
Ah, thanks.

Powered by DjangoBB