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

#1 2008-08-22 16:08:06

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

< Color Touching [ sprite ] >

I would like that block.pleeze

Offline

 

#2 2008-08-22 16:24:52

Kingbradley6
Scratcher
Registered: 2007-05-17
Posts: 100+

Re: < Color Touching [ sprite ] >

Is there not a 'touching color' block already?

Offline

 

#3 2008-08-22 16:55:13

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: < Color Touching [ sprite ] >

Yeah but color touching a sprite is somthing we need

Offline

 

#4 2008-08-22 18:01:26

Ivaash
Scratcher
Registered: 2008-02-08
Posts: 100+

Re: < Color Touching [ sprite ] >

keroro645 wrote:

Yeah but color touching a sprite is somthing we need

keroro645 wrote:

No it's not you can have a variable that says touching color and make a scripts that says if touching color blue set touching blue to 1


Hey there..

Offline

 

#5 2008-08-22 18:02:57

Ivaash
Scratcher
Registered: 2008-02-08
Posts: 100+

Re: < Color Touching [ sprite ] >

when flag clicked
forever
if touching color blue
set variable to 1
else set variable to two


Hey there..

Offline

 

#6 2008-08-22 18:13:27

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: < Color Touching [ sprite ] >

Can a sprite sense the color of the mouse?

Offline

 

#7 2008-08-22 18:27:59

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: < Color Touching [ sprite ] >

keroro645 wrote:

Can a sprite sense the color of the mouse?

No.  But it could sense the color of another sprite that was following the mouse with tthis type of script

Forever
    Go To Mouse Pointer
End


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#8 2008-08-22 18:32:44

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: < Color Touching [ sprite ] >

Paddle2See wrote:

keroro645 wrote:

Can a sprite sense the color of the mouse?

No.  But it could sense the color of another sprite that was following the mouse with tthis type of script

Forever
    Go To Mouse Pointer
End

I thought of doing that but then i changed my mind.I dont know why.Its for the text wars game.Im working on a scratch version of the game.

Offline

 

#9 2008-08-30 09:41:01

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: < Color Touching [ sprite ] >

To make a sprite sense whether another sprite is touching a certain color, give the sprite ("sensor") that senses the color a variable like "touchingColorX". Then use a script like this:

On sprite "sensor":

When flag clicked:
Forever:
If (touching color x?)
  Set touchingColorX to 1
Else
  Set touchingColorX to 0
EndForever

Then any other sprite can access this variable using the (property of sprite) block.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#10 2008-08-30 10:53:56

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: < Color Touching [ sprite ] >

Well still im too lazy to put sensors.And i dont need this block anymore.But it would still be nice to have though.

Offline

 

#11 2010-07-27 09:45:27

RCScratch
Scratcher
Registered: 2010-05-26
Posts: 48

Re: < Color Touching [ sprite ] >

we already have a block like that[blocks]<>[/blocks]

Last edited by RCScratch (2010-07-27 09:45:52)


http://i736.photobucket.com/albums/xx7/RCScratch/RCSCRatch.gif http://www.danasoft.com/sig/467044211994.jpg

Offline

 

#12 2010-07-27 09:47:05

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: < Color Touching [ sprite ] >

RCScratch wrote:

we already have a block like that[blocks]<>[/blocks]

I'm not so sure what you're talking about... However, we do have a <touching colour> block, which works just as well. This topic is quite old, though...

Offline

 

#13 2010-07-27 10:54:50

JeanTheFox
Scratcher
Registered: 2010-06-14
Posts: 1000+

Re: < Color Touching [ sprite ] >

Yes, it seems a lot of people want (What I call) "Compact Blocks", which I see as blocks that are basically scripts of smaller blocks compacted into one block (Hence Compact Block). The entire point of Scratch is to get used to programming by using basic blocks. If we combine blocks, we aren't really helping anyone.

Scratch On!  smile

Last edited by JeanTheFox (2010-07-27 10:55:20)


http://i51.tinypic.com/20gcn5j.png

Offline

 

Board footer