Discuss Scratch
- Yanderan
-
100+ posts
"Almost"
Here is my newest (for now) idea:
<almost touching color [#758606] ?::sensing>I would like a reply saying
Nice idea! Support!![]()
Last edited by Yanderan (Aug. 20, 2016 13:38:00)
- DownsGameClub
-
1000+ posts
"Almost"
“Almost” seems too ambiguous to me. Sorry, but I won't support. There are over millions of definitions of the term, almost, and especially since programming should be exact, you should probably use this workaround.
<<[x] < [y]> or <[x] < [z]>>
- MasterJPixel
-
500+ posts
"Almost"
I have the same question. No support until further notice. Define “almost”.
- pinkieofthepies
-
500+ posts
"Almost"
define almost, how far would it be from it. like if it was
would it just respond to 5 6 and 7, or would it also go for 8,4 ECT?
if <almost ((6) - (1))::operators> then
say [...]
end
would it just respond to 5 6 and 7, or would it also go for 8,4 ECT?
Last edited by pinkieofthepies (Aug. 19, 2016 20:45:21)
- Yanderan
-
100+ posts
"Almost"
OK. Here's a really good example:I have the same question. No support until further notice. Define “almost”.
when gf clicked
forever
if <almost <touching color [#b7db01] ?>::operators> then
end
end
Last edited by Yanderan (Aug. 19, 2016 21:08:45)
- Sigton
-
1000+ posts
"Almost"
Why does it have a Boolean input; Booleans only have 2 possible values so one cannot be “almost” the other.
Sigton
Sigton
- Ziggy741
-
1000+ posts
"Almost"
Wait, what would it exactly do? Would it report true for this?
almost <((1) + (0.9)) = [2]> :: boolean operators
- alexphan
-
1000+ posts
"Almost"
Why in the world do you think we hate you? We don't hate you, we just need more details on your idea. *sniff* No one likes me. If you think I'm horrible, just quote this and either put Y (you hate me) or N (you like me)

Now, let's look at the example you provided:
when gf clickedThis means it's close to touching the color, right?
forever
if <almost <touching color [#b7db01] ?>::operators> then
end
end
But how “close” does the sprite have to be? 10 pixels? 20 pixels? 1 pixel? The word “almost” just seems ambiguous.
- Paddle2See
-
1000+ posts
"Almost"
Some off-topic posts removed. Please make sure your posts remain focused on the suggestion.
- Yanderan
-
100+ posts
"Almost"
Thanks for balancing this out, Paddle2See Some off-topic posts removed. Please make sure your posts remain focused on the suggestion.

- Yanderan
-
100+ posts
"Almost"
It has to be at least within 8 pixels of the colorWhy in the world do you think we hate you? We don't hate you, we just need more details on your idea. *sniff* No one likes me. If you think I'm horrible, just quote this and either put Y (you hate me) or N (you like me)
Now, let's look at the example you provided:when gf clickedThis means it's close to touching the color, right?
forever
if <almost <touching color [#b7db01] ?>::operators> then
end
end
But how “close” does the sprite have to be? 10 pixels? 20 pixels? 1 pixel? The word “almost” just seems ambiguous.

- Sigton
-
1000+ posts
"Almost"
Would it's distance from that color or how close the color it is touching is to that color? It has to be at least within 8 pixels of the color
Sigton
- Alberknyis
-
1000+ posts
"Almost"
“Almost” is waaaaay too ambiguous. Everyone has a different idea of almost. If what you want is this:
Then that's what you need to suggest.
But I wouldn't support either
. I wouldn't find this block useful at all.
<within () pixels of color [#395f4a]::sensing>
Then that's what you need to suggest.
But I wouldn't support either

- Sheep_maker
-
1000+ posts
"Almost"
<almost<key [space v] pressed>::operators>what would those report, assuming my finger is 1 cm above the space bar and another finger is 2 cm above the primary mouse button?
<almost<mouse down>::operators>
<almost<not<>>::operators>
- Alberknyis
-
1000+ posts
"Almost"
<almost<key [space v] pressed>::operators>what would those report, assuming my finger is 1 cm above the space bar and another finger is 2 cm above the primary mouse button?
<almost<mouse down>::operators>
<almost<not<>>::operators>
First, Scratch would have to officially define “Almost” for every occasion this block can be used in. Let's say for key presses, your finger has to be touching the key, but not pressing it. Same for mouse. This would definitely work and not fail. And for the last boolean, if the statement in the “Almost” block is false, but very close to true (true within 1 degree of truthfulness), then it would report true.
- pinkieofthepies
-
500+ posts
"Almost"
why was my post removed? it was focused on the suggestion DX Some off-topic posts removed. Please make sure your posts remain focused on the suggestion.
anyways, im starting to get this, but there are some things that seem “broken”
<almost <not <key [v v] pressed?>>::operators>
thats just one example.
how would this work?
- Alberknyis
-
1000+ posts
"Almost"
<almost <not <key [v v] pressed?>>::operators>
thats just one example.
how would this work?
*sigh* If you're pressing the key, but you're almost not pressing it, then it returns true. Is it really that hard?
Last edited by Alberknyis (Aug. 20, 2016 07:33:29)
- Jonathan50
-
1000+ posts
"Almost"
almost not pressing it, then it returns true. Is it really that hard?Most PCs can't detect that sort of thing. *sigh* If you're pressing the key, but you're
- mrbobbygreathead
-
1000+ posts
"Almost"
The problem is that you would have to manually make an algorithm for each block it's applied to. It's unnecessary, abstract and workarounds can be made.