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

#1 2011-06-04 18:46:34

Combinebobnt
Scratcher
Registered: 2009-06-30
Posts: 13

Improvment of the Touching Color Block

(If you don't want to know why I need this, then scroll down a little to just see the suggestion)

I finally felt like digging up scratch again and doing something with it, so I started to make a nice little gardening project with formulas for the climate and soil composition and such. Everything is perfect and the land builds completely like I want it too.

Now, I want to implement the plants in my project, and so the first thing I need to code is root construction. While that might sound easy, there is one thing in my standing in my way, preventing me from doing this.

<touching color[

This block may seem harmless and perfectly normal to use. In a way, it is. You use a little eyedropper tool to select a color and then this block tells you wether you the sprite is touching that color with either false or true. However, in my project, I need a way to have the root generator sprite distinguish between soil, rocks, and air. The only differences between those 3 things are thier colors, which are randomly generated based on fromulas and random numbers.

Seeing how there are 20 possible colors and 80 possible brightness levels for soil, if I were to use the eyedropper, I would need to put 1600 TOUCHING COLOR blocks in a single IF block. Doing that would most likely crash scratch, as I wold have to do this 3 times for soil and the 2 types of rocks.

//Suggestion:
What I really want is a different way to select color for this block, besides the eyedropper. Doing this would allow touching color blocks to change the color they need without use of the eyedropper, as you can only use the eyedropper outside of the game area, not in it. I was thinking of a hexidecimal "FF FF FF FF" (red, green, blue, and alpha). Doing it in hexidecimal would also clash less with normal numbers, preventing more errors in coding.

<touching color[ FFAA99EE ]>

I hope you at least consider this, as now my project must be re-coded to make everything just 1 color, which looks very bland.

Offline

 

#2 2011-06-06 08:19:50

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Improvment of the Touching Color Block

Actually, we should just have full color support like Pantherbig_smile

Offline

 

#3 2011-06-06 09:54:32

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: Improvment of the Touching Color Block

When you put blocks in posts, you have to put

Code:

[blocks][/blocks]

around them. That is something EVERYONE forgets.

But anyway, cool idea. I support  big_smile


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#4 2011-07-30 16:20:40

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: Improvment of the Touching Color Block

It should have blocks like in panther!


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

Board footer