Discuss Scratch

MrFluffyPenguins
Scratcher
1000+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

xXRedTheCoderXx wrote:

j3r0_plays wrote:

Okay, let me say. I ABSOLUTELY HATE THIS IDEA. I am out of here.
Woah - did somebody really say that? I can't find the post, so I'm guessing it got deleted. And for good reason, that kinda hurt my feelings. XD Welp, I guess you can't please everybody.
Yeah, it looks like it got deleted.
new page except i forgot to look at the number and i don't want to edit twice

Last edited by MrFluffyPenguins (Aug. 12, 2020 22:53:20)

-Rex-
Scratcher
500+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

xXRedTheCoderXx wrote:

Hmm…, in that case, maybe try reading some of the posts that say how this would be super useful for a project they're making. This is one of them :

coder2045 wrote:

Support. I've had to use eight broadcasts and ten scripts in an animation just to have characters fight over a paper airplane and I could just do:
set [marker v] to [0]
run{
line 1:: #0000dd
set [marker v] to [1]
}while running{
run{
wait until <(marker) = [1]>
line 2:: #f00000
set [marker v] to [2]
}while running{
run{
wait until <(marker) = [2]>
line 3:: #f0f000
set [marker v] to [3]
}while running{
...
}:: control
}:: control
}:: control
There is literally no reason to use the suggested block in that example unless the marker variable can also be changed by another script, which would be incredibly unintuitive (especially in an animation) and therefore have a better alternative than using this block.

Last edited by -Rex- (Aug. 13, 2020 05:07:57)

j3r0_plays
Scratcher
100+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

Mr_PenguinAlex wrote:

xXRedTheCoderXx wrote:

j3r0_plays wrote:

Okay, let me say. I ABSOLUTELY HATE THIS IDEA. I am out of here.
Woah - did somebody really say that? I can't find the post, so I'm guessing it got deleted. And for good reason, that kinda hurt my feelings. XD Welp, I guess you can't please everybody.
Yeah, it looks like it got deleted.
new page except i forgot to look at the number and i don't want to edit twice
It got deleted. By the scratch team.. :I
the-joiner
Scratcher
100+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

run {
Support :: custom-arg
} while running {
Realy support :: list
} :: control
the-joiner
Scratcher
100+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

I wanted to do 2 same custom blocks but it didn't work.
scratch978654
Scratcher
100+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

Wait, so if I do this:
Run {
add [thing] to [list v]
} while running {
delete (all v) of [list v]
} :: control
What will happen?

Last edited by scratch978654 (Aug. 13, 2020 06:55:55)

Maximouse
Scratcher
1000+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

scratch978654 wrote:

Wait, so if I do this:
Run {
add [thing] to [list v]
} while running {
delete (all v) of [list v]
} :: control
What will happen?
The top script would start running first, so after the block returns the list will be empty.
_RareScratch2_
Scratcher
100+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

Support!
Run {
set (hacked block ::sensing hat) to [run]
say [Support!]
} while running {
if <(hacked block ::sensing hat) = [run]> then
run (say [Lots of support!] ::looks cap) for (2) seconds ::extension
end
} :: control
Zelfen
Scratcher
1000+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

_RareScratch2_ wrote:

Support!
Run {
set (hacked block ::sensing hat) to [run]
say [Support!]
} while running {
if <(hacked block ::sensing hat) = [run]> then
run (say [Lots of support!] ::looks cap) for (2) seconds ::extension
end
} :: control
Umm, what?
xXRedTheCoderXx
Scratcher
1000+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

Maximouse wrote:

scratch978654 wrote:

Wait, so if I do this:
Run {
add [thing] to [list v]
} while running {
delete (all v) of [list v]
} :: control
What will happen?
The top script would start running first, so after the block returns the list will be empty.
Correct, thank you Maximouse!

-Rex- wrote:

There is literally no reason to use the suggested block in that example unless the marker variable can also be changed by another script, which would be incredibly unintuitive (especially in an animation) and therefore have a better alternative than using this block.
If you think compressing 10 scripts into 1 is useless, or being able to easily run multiple scripts in a custom block is useless, then okay. So be it.
leahcimto
Scratcher
1000+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

Support! I have been wanting to do this for a long time!
lisa_wolfgang
Scratcher
100+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

Would the code in “while running” stop working after the code in “run” is finished?

Also, this block would need a new name, as it might confuse people who are new to technology and don't know that “run” means something other than making the Scratch Cat run across the screen.

Personally, I've never needed this block because the values I'm plugging in are often variables themselves, but I understand how other people could find it helpful.
MrFluffyPenguins
Scratcher
1000+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

lisa_wolfgang wrote:

Also, this block would need a new name, as it might confuse people who are new to technology and don't know that “run” means something other than making the Scratch Cat run across the screen.
Maybe “do while doing” would be better?
It sounds a lot weirder though.
Maximouse
Scratcher
1000+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

Mr_PenguinAlex wrote:

lisa_wolfgang wrote:

Also, this block would need a new name, as it might confuse people who are new to technology and don't know that “run” means something other than making the Scratch Cat run across the screen.
Maybe “do while doing” would be better?
It sounds a lot weirder though.
I'm not sure if it actually sounds weird:
do {
} while doing {
} :: control
scratch978654
Scratcher
100+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

Maximouse wrote:

Mr_PenguinAlex wrote:

lisa_wolfgang wrote:

Also, this block would need a new name, as it might confuse people who are new to technology and don't know that “run” means something other than making the Scratch Cat run across the screen.
Maybe “do while doing” would be better?
It sounds a lot weirder though.
I'm not sure if it actually sounds weird:
do {
} while doing {
} :: control
Yes, in fact most languages have a do-while loop, even though it does something different.
Maximouse
Scratcher
1000+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

scratch978654 wrote:

Yes, in fact most languages have a do-while loop, even though it does something different.
And I think “do while” sounds less weird than “run while”.
xXRedTheCoderXx
Scratcher
1000+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

Maximouse wrote:

scratch978654 wrote:

Yes, in fact most languages have a do-while loop, even though it does something different.
And I think “do while” sounds less weird than “run while”.
I agree, I'll change it. Thanks for your input!
scratch978654
Scratcher
100+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

Maximouse wrote:

scratch978654 wrote:

Yes, in fact most languages have a do-while loop, even though it does something different.
And I think “do while” sounds less weird than “run while”.
Problem is, that people coming from, say, JS, will feel confused as to why there isn't a while loop if there is do while. Perhaps
do {
} and {
} at the same time :: control

Last edited by scratch978654 (Aug. 14, 2020 15:30:43)

cooldude-222
Scratcher
100+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

@xxRedTheCoderxx
can you make the block run while running it just sounds better and you don't to code you run code.
xXRedTheCoderXx
Scratcher
1000+ posts

"Run, and run" E block (READ THE ENTIRE OP BEFORE POSTING)

cooldude-222 wrote:

@xxRedTheCoderxx
can you make the block run while running it just sounds better and you don't to code you run code.
That was my logic, but people wanted it to change as it may be confusing to some new to coding and technology.

lisa_wolfgang wrote:

Also, this block would need a new name, as it might confuse people who are new to technology and don't know that “run” means something other than making the Scratch Cat run across the screen.

Mr_PenguinAlex wrote:

Maybe “do while doing” would be better?

Maximouse wrote:

And I think “do while” sounds less weird than “run while”.

Powered by DjangoBB