Is there not a 'touching color' block already?
Offline
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
Offline
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
Offline
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
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.
Offline
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
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!
Last edited by JeanTheFox (2010-07-27 10:55:20)
Offline