Discuss Scratch
- Discussion Forums
- » Suggestions
- » Workarounds to frequently suggested blocks
- PixelYoshi
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
sorry i didn't test out all the keys and your Tests project is right it only works with , . / ' ; \ = - and enter.actually, i tested it, and it DOES work for ANY key!D:<Unfortunately, no.does the “key enter pressed” workaround work with other keys too?Sensing :: sensing hat———————————————————–< am i a clone ? :: sensing>can be recreated with the following code:when @greenFlag clicked
set [am i a clone? v] to [false] // this variable must be "for this sprite only"
when I start as a clone
set [am i a clone? v] to [true]
if < ( am i a clone? ) = [true] > then
...< key [enter v] pressed? >can be recreated with the following code:< key ( join [enter] [] ) pressed? >
Really??? Even CTRL?
- venyanwarrior
- Scratcher
1000+ posts
Workarounds to frequently suggested blocks
Here is a workaround to a block:
<[] ≥ [] :: operators >can be replicated with
<<[] > [] > or <[] = []>>or
<[] > <[] = []> >
If you're seeing this signature, that means I've come out of my social anxiety hole.
Also, I edit the Scratch Wiki. Check it out sometime it's cool I guess.
- WindOctahedron
- Scratcher
1000+ posts
Workarounds to frequently suggested blocks
Or Here is a workaround to a block:<[] ≥ [] :: operators >can be replicated with<<[] > [] > or <[] = []>>or<[] > <[] = []> >
<not <[] < []>>
The message above may contain wrong information, rude remarks, or something embarrassing to my current self. In this case, please ignore it and remember that I likely wrote it back when I didn't know what “respect” truly meant. I really hate thinking about it again.
- Computer_Fizz
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
I think i'll go with wind's method since the first requires you to put everything twice and the second isn't clear about what inputs should have what. cool to see the neat workarounds thoughOr Here is a workaround to a block:<[] ≥ [] :: operators >can be replicated with<<[] > [] > or <[] = []>>or<[] > <[] = []> ><not <[] < []>>
- Hopeijay
- Scratcher
90 posts
Workarounds to frequently suggested blocks
actually, i tested it, and it DOES work for ANY key!D:<Unfortunately, no.does the “key enter pressed” workaround work with other keys too?Sensing :: sensing hat———————————————————–< am i a clone ? :: sensing>can be recreated with the following code:when @greenFlag clicked
set [am i a clone? v] to [false] // this variable must be "for this sprite only"
when I start as a clone
set [am i a clone? v] to [true]
if < ( am i a clone? ) = [true] > then
...< key [enter v] pressed? >can be recreated with the following code:< key ( join [enter] [] ) pressed? >
Really??? Even CTRL?
I don't think it works with CTRL/ALT but it does work with things like “/” and “,” or “.” Mabey “\”, ""
Have your hands not been washed in the last 5 hours? CALL 1-800-GOTOTHESINKANDWASHYOURHANDS now, to keep COVID-19 away! That's 1-800-GOTOTHESINKANDWASHYOURHANDS Thank you!
- Beamy68
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
We've established that. I don't think it works with CTRL/ALT but it does work with things like “/” and “,” or “.” Mabey “\”, ""
Last edited by Beamy68 (Oct. 18, 2019 22:07:03)
Post Goal:
Motion::motion
Looks::looks
Sound::sound
Pen::pen
Events::events
Control::control
Sensing::sensing
Operators::operators
Variables::variables
List::list
More Blocks::custom
bemy
- WindOctahedron
- Scratcher
1000+ posts
Workarounds to frequently suggested blocks
Workaround to:
(amount of () in [list v] :: list)Taken from here.
define calculate amount of (item) in list
set [i v] to [1]
set [amount v] to [0]
repeat (length of [list v] :: list)
if <(item (i) of [list v] :: list) = (item :: custom arg)> then
change [amount v] by (1)
end
change [i v] by (1)
end
The message above may contain wrong information, rude remarks, or something embarrassing to my current self. In this case, please ignore it and remember that I likely wrote it back when I didn't know what “respect” truly meant. I really hate thinking about it again.
- mica43683
- Scratcher
500+ posts
Workarounds to frequently suggested blocks
when <> is true :: hat eventscan, more easily, be recreated with
forever
if <...> then
...
wait until <not <...>>
end
end
I got a lot of compliments on my last signature, and I think that's kind of strange. I wrote it when I was 12 and it wasn't very good. I acted like PS4 controllers were the epitome of human technology, for God's sake! I tried too hard to be philosophical, or maybe I tried too hard to be funny, or maybe it was something else. But that signature was bad. It wasn't good. It might be strange for some of you to hear this, seeing as this site is full of kids, but 12-year-old me was practically a baby. I think that's something you realise when you grow up. That you're always better than you were last year. I was looking through old Skype messages between me and a friend of mine from when we were 12, and as I read them, I couldn't stop thinking, “Woah. I was the worst.” It's important to know that you're always the worst. I can almost guarantee that future you is thinking negatively of you right now, just as future me is thinking negatively of me. It's important not to let that get to you. Remember to stay in the present. Tomorrow hates you, but it can't hurt you because you'll never get to tomorrow. When I was 10 or 11, I remember seeing the world very cynically. I thought that human life was inherently selfish, and that we were only put on this planet to destroy it. I'm so glad 10 or 11 year old me is gone, because 17 year old me would NOT get along with that kid.
- Computer_Fizz
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
no, because your version requires the green flag to be clicked. it could be said that not requiring the flag is the entire point of the block.when <> is true :: hat eventscan, more easily, be recreated withforever
if <...> then
...
wait until <not <...>>
end
end
- kittiesrule247
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
No, it's not the entire point of the block. Besides, you click the green flag to start. If you don't click the green flag, then things get confusing.no, because your version requires the green flag to be clicked. it could be said that not requiring the flag is the entire point of the block.when <> is true :: hat eventscan, more easily, be recreated withforever
if <...> then
...
wait until <not <...>>
end
end
LGBTQIAPNDO+ PRIDE
- Computer_Fizz
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
regardless, my version actually creates the block better, which is first priority. No, it's not the entire point of the block. Besides, you click the green flag to start. If you don't click the green flag, then things get confusing.
- venyanwarrior
- Scratcher
1000+ posts
Workarounds to frequently suggested blocks
One of the big rules of coding is that if you can make it simpler, do it. Mica's way condenses it into one script, but your way requires two separate scripts. Mica's way is better.regardless, my version actually creates the block better, which is first priority. No, it's not the entire point of the block. Besides, you click the green flag to start. If you don't click the green flag, then things get confusing.
If you're seeing this signature, that means I've come out of my social anxiety hole.
Also, I edit the Scratch Wiki. Check it out sometime it's cool I guess.
- Beamy68
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
Yup I agree with everyone else,One of the big rules of coding is that if you can make it simpler, do it. Mica's way condenses it into one script, but your way requires two separate scripts. Mica's way is better.regardless, my version actually creates the block better, which is first priority. No, it's not the entire point of the block. Besides, you click the green flag to start. If you don't click the green flag, then things get confusing.
Post Goal:
Motion::motion
Looks::looks
Sound::sound
Pen::pen
Events::events
Control::control
Sensing::sensing
Operators::operators
Variables::variables
List::list
More Blocks::custom
bemy
- kittiesrule247
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
At least add Mica's as an alternative way.regardless, my version actually creates the block better, which is first priority. No, it's not the entire point of the block. Besides, you click the green flag to start. If you don't click the green flag, then things get confusing.
LGBTQIAPNDO+ PRIDE
- Beamy68
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
Yeah, I agreeAt least add Mica's as an alternative way.regardless, my version actually creates the block better, which is first priority. No, it's not the entire point of the block. Besides, you click the green flag to start. If you don't click the green flag, then things get confusing.
Post Goal:
Motion::motion
Looks::looks
Sound::sound
Pen::pen
Events::events
Control::control
Sensing::sensing
Operators::operators
Variables::variables
List::list
More Blocks::custom
bemy
- Computer_Fizz
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
that's the second rule. the first rule is to make it work One of the big rules of coding is that if you can make it simpler, do it.
yes, more scripts is required for more functionality. Mica's way condenses it into one script, but your way requires two separate scripts.
there's no need to be rude you know Mica's way is better.
- mica43683
- Scratcher
500+ posts
Workarounds to frequently suggested blocks
The
This would run when neither are true, as well as one xor the other. The proper workaround would be
<<> xor <>::operators>block cannot be recreated as
<not <<output1> = <output2>>>
This would run when neither are true, as well as one xor the other. The proper workaround would be
<<<output1> and <not <output2>>> or <<output2> and <not <output1>>>>
I got a lot of compliments on my last signature, and I think that's kind of strange. I wrote it when I was 12 and it wasn't very good. I acted like PS4 controllers were the epitome of human technology, for God's sake! I tried too hard to be philosophical, or maybe I tried too hard to be funny, or maybe it was something else. But that signature was bad. It wasn't good. It might be strange for some of you to hear this, seeing as this site is full of kids, but 12-year-old me was practically a baby. I think that's something you realise when you grow up. That you're always better than you were last year. I was looking through old Skype messages between me and a friend of mine from when we were 12, and as I read them, I couldn't stop thinking, “Woah. I was the worst.” It's important to know that you're always the worst. I can almost guarantee that future you is thinking negatively of you right now, just as future me is thinking negatively of me. It's important not to let that get to you. Remember to stay in the present. Tomorrow hates you, but it can't hurt you because you'll never get to tomorrow. When I was 10 or 11, I remember seeing the world very cynically. I thought that human life was inherently selfish, and that we were only put on this planet to destroy it. I'm so glad 10 or 11 year old me is gone, because 17 year old me would NOT get along with that kid.
- WindOctahedron
- Scratcher
1000+ posts
Workarounds to frequently suggested blocks
Let's break this down. The<<> xor <>::operators>block cannot be recreated as<not <<output1> = <output2>>>
This would run when neither are true, as well as one xor the other. The proper workaround would be<<<output1> and <not <output2>>> or <<output2> and <not <output1>>>>
We start with “false=false”, which outputs “true”, because “false” is the same as “false”.
Then we add “not”, which makes “not true”, or, in other words, “false”.
If the end result is “false”, the code (inside the “if” block) won't run.
The message above may contain wrong information, rude remarks, or something embarrassing to my current self. In this case, please ignore it and remember that I likely wrote it back when I didn't know what “respect” truly meant. I really hate thinking about it again.
- mica43683
- Scratcher
500+ posts
Workarounds to frequently suggested blocks
Oh, yeah. I forgot that things count as the same when neither are true.Let's break this down. The<<> xor <>::operators>block cannot be recreated as<not <<output1> = <output2>>>
This would run when neither are true, as well as one xor the other. The proper workaround would be<<<output1> and <not <output2>>> or <<output2> and <not <output1>>>>
We start with “false=false”, which outputs “true”, because “false” is the same as “false”.
Then we add “not”, which makes “not true”, or, in other words, “false”.
If the end result is “false”, the code (inside the “if” block) won't run.
I got a lot of compliments on my last signature, and I think that's kind of strange. I wrote it when I was 12 and it wasn't very good. I acted like PS4 controllers were the epitome of human technology, for God's sake! I tried too hard to be philosophical, or maybe I tried too hard to be funny, or maybe it was something else. But that signature was bad. It wasn't good. It might be strange for some of you to hear this, seeing as this site is full of kids, but 12-year-old me was practically a baby. I think that's something you realise when you grow up. That you're always better than you were last year. I was looking through old Skype messages between me and a friend of mine from when we were 12, and as I read them, I couldn't stop thinking, “Woah. I was the worst.” It's important to know that you're always the worst. I can almost guarantee that future you is thinking negatively of you right now, just as future me is thinking negatively of me. It's important not to let that get to you. Remember to stay in the present. Tomorrow hates you, but it can't hurt you because you'll never get to tomorrow. When I was 10 or 11, I remember seeing the world very cynically. I thought that human life was inherently selfish, and that we were only put on this planet to destroy it. I'm so glad 10 or 11 year old me is gone, because 17 year old me would NOT get along with that kid.
- mica43683
- Scratcher
500+ posts
Workarounds to frequently suggested blocks
So does yours. The timer only starts once the green flag is clicked. And, if you really insist on not using the green flag, just use this:no, because your version requires the green flag to be clicked. it could be said that not requiring the flag is the entire point of the block.when <> is true :: hat eventscan, more easily, be recreated withforever
if <...> then
...
wait until <not <...>>
end
end
when green flag clicked
forever
reset timer
end
when [timer v] > (1)
forever
if <...> then
...
wait until <not <...>>
end
end
Actually, if you want it to work in seperate sprites, you need to use my idea. The broadcast would get carried out to other sprites as well, and trigger the script in them.regardless, my version actually creates the block better, which is first priority. No, it's not the entire point of the block. Besides, you click the green flag to start. If you don't click the green flag, then things get confusing.
Also, mine only runs when the boolean turns from false to true. Yours keeps on running over and over again as long as the boolean is true, which is the same as
forever
if <...> then
end
end
Last edited by mica43683 (Oct. 26, 2019 10:56:46)
I got a lot of compliments on my last signature, and I think that's kind of strange. I wrote it when I was 12 and it wasn't very good. I acted like PS4 controllers were the epitome of human technology, for God's sake! I tried too hard to be philosophical, or maybe I tried too hard to be funny, or maybe it was something else. But that signature was bad. It wasn't good. It might be strange for some of you to hear this, seeing as this site is full of kids, but 12-year-old me was practically a baby. I think that's something you realise when you grow up. That you're always better than you were last year. I was looking through old Skype messages between me and a friend of mine from when we were 12, and as I read them, I couldn't stop thinking, “Woah. I was the worst.” It's important to know that you're always the worst. I can almost guarantee that future you is thinking negatively of you right now, just as future me is thinking negatively of me. It's important not to let that get to you. Remember to stay in the present. Tomorrow hates you, but it can't hurt you because you'll never get to tomorrow. When I was 10 or 11, I remember seeing the world very cynically. I thought that human life was inherently selfish, and that we were only put on this planet to destroy it. I'm so glad 10 or 11 year old me is gone, because 17 year old me would NOT get along with that kid.
- Discussion Forums
- » Suggestions
- » Workarounds to frequently suggested blocks