Discuss Scratch

MistyHH
Scratcher
100+ posts

Helpful Workarounds for Frequently Suggested Blocks!

Spooky_Lukey wrote:

make this
when 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>
<[list v] contains [thing] ?::lists>
doesn't work the same
1080GBA
Scratcher
500+ posts

Helpful Workarounds for Frequently Suggested Blocks!

MistyHH wrote:

Spooky_Lukey wrote:

make this
when stop sign clicked
when green flag clicked
forever
reset timer
end
when [timer v] > (0.01)
...



   ↕

when (::#ff0000) clicked ::  events hat
you also need a
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!

DIAVLODUDE wrote:

I have a question. How do I make it check if a sprite has a costume name? Thanks! Workaround, please!
costume [name v]:: looks reporter
Or:
<(costume [name v]:: looks reporter) = [whatever costume name you want to type here]>
Or:
delete all of [name v]:: list
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
Edit: This is a cursed post (1111# tsoP).

Last edited by k0d3rrr (March 9, 2022 12:08:54)

1080GBA
Scratcher
500+ posts

Helpful Workarounds for Frequently Suggested Blocks!

k0d3rrr wrote:

DIAVLODUDE wrote:

I have a question. How do I make it check if a sprite has a costume name? Thanks! Workaround, please!
costume [name v]:: looks reporter
Or:
<(costume [name v]:: looks reporter) = [whatever costume name you want to type here]>
Or:
delete all of [name v]:: list
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
Edit: This is a cursed post (#1111)
the number is supposed to be named index
Don't overthink the 2nd one:
delete all of [costume names v]:: list
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
Edit: This is the real post #1111

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!

memario1763 wrote:

k0d3rrr wrote:

Jerememes wrote:

I would like to have a work around for a block a bunch of people wanted to suggest
<sprite [Sprite1] is touching [Sprite2] ?>
The workaround is this: (Both scripts are placed in Sprite1)
when green flag clicked
forever
if <touching [Sprite2 v]> then
set [touching v] to [true]


else
if <not <touching [Sprite2 v]>> then
set [touching v] to [false]
end
end
Now for detection…
when 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
end
Don't Over Think It!?!?
when green flag clicked
if <touching [Sprite Name Here v] ?> then
say [True]
end
if <not <touching [Sprite Name Here v] ?>> then
say [False]
end
I didn't saw the other quotes, but you forgot the forever block.

dante_ksk wrote:

<[ 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]>
An really funny way I guess.

Last edited by SeuAmigo35 (March 9, 2022 23:04:55)

1080GBA
Scratcher
500+ posts

Helpful Workarounds for Frequently Suggested Blocks!

shradibop wrote:

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)
(remove [a] from [any]::operators)
i expect it to report ‘ny’, which is the opposite of
(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!

MistyHH wrote:

RealGTheKid wrote:

-snip-
i dont know if this is possible but cloud lists and the ability to make cloud variables unique to eache user
Do you mean like if you had a game that saved your progress to the cloud, each user would have their own cloud space?
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.
yes its super complicated
goldenlion06
Scratcher
500+ posts

Helpful Workarounds for Frequently Suggested Blocks!

1080GBA wrote:

MistyHH wrote:

RealGTheKid wrote:

-snip-
i dont know if this is possible but cloud lists and the ability to make cloud variables unique to eache user
Do you mean like if you had a game that saved your progress to the cloud, each user would have their own cloud space?
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.
yes its super complicated
with a save code if u understand it u can change ur stats
1080GBA
Scratcher
500+ posts

Helpful Workarounds for Frequently Suggested Blocks!

goldenlion06 wrote:

1080GBA wrote:

MistyHH wrote:

RealGTheKid wrote:

-snip-
i dont know if this is possible but cloud lists and the ability to make cloud variables unique to eache user
Do you mean like if you had a game that saved your progress to the cloud, each user would have their own cloud space?
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.
yes its super complicated
with a save code if u understand it u can change ur stats
there can only be 10 cloud vars
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.
shradibop
Scratcher
100+ posts

Helpful Workarounds for Frequently Suggested Blocks!

stop [all v]

Powered by DjangoBB