Discuss Scratch
- Discussion Forums
- » Suggestions
- » Helpful Workarounds for Frequently Suggested Blocks!
- MistyHH
-
Scratcher
100+ posts
Helpful Workarounds for Frequently Suggested Blocks!
make thiswhen stop sign clicked
when green flag clicked
forever
reset timer
end
when [timer v] > (0.01)
...
↕
when (::#ff0000) clicked :: events hat
Last edited by MistyHH (March 8, 2022 20:25:17)
- 1080GBA
-
Scratcher
500+ posts
Helpful Workarounds for Frequently Suggested Blocks!
<(list::lists) contains [thing] ?::operators>doesn't work the same
<[list v] contains [thing] ?::lists>
- 1080GBA
-
Scratcher
500+ posts
Helpful Workarounds for Frequently Suggested Blocks!
you also need amake thiswhen stop sign clickedwhen green flag clicked
forever
reset timer
end
when [timer v] > (0.01)
...
↕when (::#ff0000) clicked :: events hat
when [timer v] > (0.01)
forever
reset timer
end
- DIAVLODUDE
-
Scratcher
76 posts
Helpful Workarounds for Frequently Suggested Blocks!
I have a question. How do I make it check if a sprite has a costume name? Thanks! Workaround, please!
- k0d3rrr
-
Scratcher
1000+ posts
Helpful Workarounds for Frequently Suggested Blocks!
I have a question. How do I make it check if a sprite has a costume name? Thanks! Workaround, please!
costume [name v]:: looks reporterOr:
<(costume [name v]:: looks reporter) = [whatever costume name you want to type here]>Or:
delete all of [name v]:: listEdit: This is a cursed post (1111# tsoP).
set [number v] to [0]
set [name v] to []
repeat (amount of costumes)
change [number v] by [1]
switch costume to (number)
set [name v] to (costume [name v]:: looks reporter)
add (name:: variables) to [name v]
end
if <[name v] contains [costume name]?> then
do something
else
end
Last edited by k0d3rrr (March 9, 2022 12:08:54)
- 1080GBA
-
Scratcher
500+ posts
Helpful Workarounds for Frequently Suggested Blocks!
the number is supposed to be named indexI have a question. How do I make it check if a sprite has a costume name? Thanks! Workaround, please!costume [name v]:: looks reporterOr:<(costume [name v]:: looks reporter) = [whatever costume name you want to type here]>Or:delete all of [name v]:: listEdit: This is a cursed post (#1111)
set [number v] to [0]
set [name v] to []
repeat (amount of costumes)
change [number v] by [1]
switch costume to (number)
set [name v] to (costume [name v]:: looks reporter)
add (name:: variables) to [name v]
end
if <[name v] contains [costume name]?> then
do something
else
end
Don't overthink the 2nd one:
delete all of [costume names v]:: listEdit: This is the real post #1111
repeat (amount of costumes)
next costume
add (costume [name v]::looks) to [costume names v]
end
if <[costume names v] contains [costume name]?> then
...
else
end
Last edited by 1080GBA (March 10, 2022 10:01:22)
- MTT-BRAND
-
Scratcher
7 posts
Helpful Workarounds for Frequently Suggested Blocks!
WOAH.
Last edited by MTT-BRAND (March 9, 2022 12:06:22)
- shradibop
-
Scratcher
100+ posts
Helpful Workarounds for Frequently Suggested Blocks!
I'm going to be giving up my role as owner of this sticky. Much like @BearSlothCoding , I'm gonna be having anyone who's interested comment on my profile, so we don't have multiple people trying to own it. Yeah.
Last edited by shradibop (March 9, 2022 12:08:35)
- SeuAmigo35
-
Scratcher
500+ posts
Helpful Workarounds for Frequently Suggested Blocks!
I didn't saw the other quotes, but you forgot the forever block.Don't Over Think It!?!?I would like to have a work around for a block a bunch of people wanted to suggestThe workaround is this: (Both scripts are placed in Sprite1)<sprite [Sprite1] is touching [Sprite2] ?>when green flag clickedNow for detection…
forever
if <touching [Sprite2 v]> then
set [touching v] to [true]
else
if <not <touching [Sprite2 v]>> then
set [touching v] to [false]
end
endwhen green flag clicked
forever
wait until <<(touching) = [true]> or <(touching) = [false]>>
if <(touching) = [true]> then
say [True]
else
if <(touching) = [false]> then
say [False]
end
endwhen green flag clicked
if <touching [Sprite Name Here v] ?> then
say [True]
end
if <not <touching [Sprite Name Here v] ?>> then
say [False]
end
An really funny way I guess.<[ message1 v] broadcasted?::events>
when green flag clicked
broadcast [message1 v]
set [broadcasted v] to <([1] + [1]) = [2] >
when I receive [ message1 v]
...
broadcast [finished v]
when I recieve [ finished v] :: events hat
set [broadcasted v] to <(1) = [Infinity]>
Last edited by SeuAmigo35 (March 9, 2022 23:04:55)
- 1080GBA
-
Scratcher
500+ posts
Helpful Workarounds for Frequently Suggested Blocks!
I'm going to be giving up my role as owner of this sticky. Much like @BearSlothCoding , I'm gonna be having anyone who's interested comment on my profile, so we don't have multiple people trying to own it. Yeah.commented
- 1080GBA
-
Scratcher
500+ posts
Helpful Workarounds for Frequently Suggested Blocks!
the workaround for
(remove (letter to remove) from (original text)::operators)i expect it to report ‘ny’, which is the opposite of
(remove [a] from [any]::operators)
(join [] [])the workaround:
set [remove index v] to [1]
set [removed v] to []
repeat (length of (original text))
if <not <(letter (remove index) of (original text))=(letter to remove)>> then
set [removed v] to (join (removed)(letter (remove index) of (original text))
end
change [remove index v] by [1]
end
Last edited by 1080GBA (March 10, 2022 03:57:41)
- 1080GBA
-
Scratcher
500+ posts
Helpful Workarounds for Frequently Suggested Blocks!
yes its super complicated-snip-Do you mean like if you had a game that saved your progress to the cloud, each user would have their own cloud space?
i dont know if this is possible but cloud lists and the ability to make cloud variables unique to eache user
That would take up too much room on the cloud storage thing, I think. Project size limits are extremely small.
The best way to save progress in that example would be to use a savecode that the person copies and pastes. But it would still be really cool to be able to have that kind of cloud storage. Highly doubt it'll be added, though. I mean, they haven't even added a previous costume block. And that is VeRy frustrating and confusing when you're trying to learn how to program.
- goldenlion06
-
Scratcher
500+ posts
Helpful Workarounds for Frequently Suggested Blocks!
with a save code if u understand it u can change ur statsyes its super complicated-snip-Do you mean like if you had a game that saved your progress to the cloud, each user would have their own cloud space?
i dont know if this is possible but cloud lists and the ability to make cloud variables unique to eache user
That would take up too much room on the cloud storage thing, I think. Project size limits are extremely small.
The best way to save progress in that example would be to use a savecode that the person copies and pastes. But it would still be really cool to be able to have that kind of cloud storage. Highly doubt it'll be added, though. I mean, they haven't even added a previous costume block. And that is VeRy frustrating and confusing when you're trying to learn how to program.
- 1080GBA
-
Scratcher
500+ posts
Helpful Workarounds for Frequently Suggested Blocks!
there can only be 10 cloud varswith a save code if u understand it u can change ur statsyes its super complicated-snip-Do you mean like if you had a game that saved your progress to the cloud, each user would have their own cloud space?
i dont know if this is possible but cloud lists and the ability to make cloud variables unique to eache user
That would take up too much room on the cloud storage thing, I think. Project size limits are extremely small.
The best way to save progress in that example would be to use a savecode that the person copies and pastes. But it would still be really cool to be able to have that kind of cloud storage. Highly doubt it'll be added, though. I mean, they haven't even added a previous costume block. And that is VeRy frustrating and confusing when you're trying to learn how to program.
- shradibop
-
Scratcher
100+ posts
Helpful Workarounds for Frequently Suggested Blocks!
Alright. I'm reporting this topic to be closed now. Here's the new one owned by @Nezon ! https://scratch.mit.edu/discuss/post/6105927/
- shradibop
-
Scratcher
100+ posts
Helpful Workarounds for Frequently Suggested Blocks!
It's still being set up, but it shouldn't be too long for Nezon to get it all situated.
- Discussion Forums
- » Suggestions
-
» Helpful Workarounds for Frequently Suggested Blocks!







