This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-08-25 19:31:54

scratchU8
Scratcher
Registered: 2009-09-08
Posts: 100+

Color [] is touching an object

Is there a possible way that something sense a color that touches an object? There is no "When color [] touches object ___" block, so I was wondering if it's possible. Is there a way to do that, or similar way to do that?

Offline

 

#2 2011-08-25 19:53:14

technomaniac
Scratcher
Registered: 2011-08-15
Posts: 94

Re: Color [] is touching an object

Turn the color part into a new sprite. Then in that sprite's scripts, put <touching[
Sorry if this doesn't work out.

Offline

 

#3 2011-08-25 21:10:52

scratchU8
Scratcher
Registered: 2009-09-08
Posts: 100+

Re: Color [] is touching an object

Oh, cool! I never thought of that!  big_smile

Offline

 

#4 2011-08-25 22:04:27

technomaniac
Scratcher
Registered: 2011-08-15
Posts: 94

Re: Color [] is touching an object

scratchU8 wrote:

Oh, cool! I never thought of that!  big_smile

You're welcome. Sometimes I come up with these type of problems. What you need to do is generalize related things and go through your problem step by step. Sounds kinda rational, geeky, but that's the way to do it.

Offline

 

#5 2011-08-26 13:53:38

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: Color [] is touching an object

Also, you can try the <Color [] is touching []> block. If the colour red (Im english, so i spell color as colour) was touching the colour black, a block of code would execute.


I'm back.
Maybe.

Offline

 

#6 2011-08-26 18:03:06

scratchU8
Scratcher
Registered: 2009-09-08
Posts: 100+

Re: Color [] is touching an object

You the <color[  ]is over[ Block? That dosen't really work. But if you talking about another block, I have no clue what you're talking about. o.o;

Offline

 

#7 2011-09-01 14:59:10

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: Color [] is touching an object

scratchU8 wrote:

You the <color[  ]is over[ Block? That dosen't really work. But if you talking about another block, I have no clue what you're talking about. o.o;

No, i ment:

[blocks]
<color[  ]is touching [  ]>
[/blocks]

I wonder if it would work (i hope it shows up)


I'm back.
Maybe.

Offline

 

#8 2011-09-01 15:01:03

Flait7
Scratcher
Registered: 2008-04-14
Posts: 100+

Re: Color [] is touching an object

Instead of needing the color to touch the sprite, get the sprite to sense that it's touching the color By using the <touching color[ ]?> block!


http://scratch.mit.edu/static/projects/Flait7/2248016_sm.pnghttp://scratch.mit.edu/static/projects/Flait7/1827934_sm.png

Offline

 

Board footer