Discuss Scratch
- Discussion Forums
- » Suggestions
- » jump block
- Mr_PenguinAlex
- Scratcher
1000+ posts
jump block
This is not a physics block. It goes to a specific part of the code, not actually jumping.
I was playing a game called Human Resource Machine (it's about coding) and it had something Scratch could have!
It's called “jump”.
When you put it into the code, you select a part of the code that it would go to. When the block is activated, it goes to that selected part of the code.
For example:
I was playing a game called Human Resource Machine (it's about coding) and it had something Scratch could have!
It's called “jump”.
When you put it into the code, you select a part of the code that it would go to. When the block is activated, it goes to that selected part of the code.
For example:
when green flag clickedAs far as I know, this is not workaroundable (except for broadcasts but those are a pain to use if your dealing with clones), and it could be used to break out of forever loops and such. There would be an arrow going from the jump block to where it is jumping, to show where it will go.
jump :: motion
if <[pigs fly] = [true]> then
stop [all v]
end
:: motion // this is where the jump goes to
Last edited by Mr_PenguinAlex (Aug. 7, 2020 02:25:57)
- ioton
- Scratcher
500+ posts
jump block
How about
don't ask me how dragging blocks into it would work
jump to end{but flipped? (meaning that the closed end would be on the right side of the script and the open end on the left side)
} :: motion
don't ask me how dragging blocks into it would work
Last edited by ioton (Aug. 6, 2020 19:34:29)
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓
▓░░█████░░██████░░█████░░██████░░█░░░█░░░▓
▓░░░▒█▒▒▒░█▒▒▒▒█▒░░▒█▒▒▒░█▒▒▒▒█▒░██░░█▒░░▓
▓░░░░█▒░░░█▒░░░█▒░░░█▒░░░█▒░░░█▒░█▒█░█▒░░▓
▓░░░░█▒░░░█▒░░░█▒░░░█▒░░░█▒░░░█▒░█▒░██▒░░▓
▓░░█████░░██████▒░░░█▒░░░██████▒░█▒░░█▒░░▓
▓░░░▒▒▒▒▒░░▒▒▒▒▒▒░░░░▒░░░░▒▒▒▒▒▒░░▒░░░▒░░▓
▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- Basic88
- Scratcher
1000+ posts
jump block
Support! The physics behind the workaround are hard (especially for a beginner).
Last edited by Basic88 (Aug. 7, 2020 01:25:07)
I have moved to @BrowserExtension
- LankyBox01
- Scratcher
1000+ posts
jump block
Support!
I don't use the operators, i use the Repeat () block and it isn't that smooth!
I don't use the operators, i use the Repeat () block and it isn't that smooth!
- scratchastroLOL
- Scratcher
1000+ posts
jump block
I think this probably belongs in Control rather than Motion…
Edit: no
Give internet pliz | Take part in a Scratch project
Backup signatures:
First siggy:
Give internet pliz: http://internetometer.com/give/47737
Second siggy:
Third siggy:
Give internet pliz | Give meh some comic ideas | Decide the name for the new Scratch cryptocurrency
- LankyBox01
- Scratcher
1000+ posts
jump block
when you jump, you basically move, which is called “Motion”i only made it a motion block because it was blue, just like the jump block in Human Resource Machine. I think this probably belongs in Control rather than Motion…
- Mr_PenguinAlex
- Scratcher
1000+ posts
jump block
it doesn't fit in the category of motion since it isn't actually moving the spritewhen you jump, you basically move, which is called “Motion”i only made it a motion block because it was blue, just like the jump block in Human Resource Machine. I think this probably belongs in Control rather than Motion…
- LankyBox01
- Scratcher
1000+ posts
jump block
lol i was playing a trick on you XDit doesn't fit in the category of motion since it isn't actually moving the spritewhen you jump, you basically move, which is called “Motion”i only made it a motion block because it was blue, just like the jump block in Human Resource Machine. I think this probably belongs in Control rather than Motion…
- LankyBox01
- Scratcher
1000+ posts
jump block
Also, no support.
This isn't a .bat file, it's a .sb3 file
No advanced stuff.
This isn't a .bat file, it's a .sb3 file
No advanced stuff.
- fdreerf
- Scratcher
1000+ posts
jump block
What? Also, no support.
This isn't a .bat file, it's a .sb3 file
No advanced stuff.
Hyped for MS-DOS 11.0
- LankyBox01
- Scratcher
1000+ posts
jump block
What? Also, no support.
This isn't a .bat file, it's a .sb3 file
No advanced stuff.
Haven't you heard of the batch programming language?Say what? Also, no support.
This isn't a .bat file, it's a .sb3 file
No advanced stuff.
In case you're living under a rock, it's some advanced programming in Command Prompt™
- fdreerf
- Scratcher
1000+ posts
jump block
Please tell me how that is relevant to anything. Haven't you heard of the batch programming language?
In case you're living under a rock, it's some advanced programming in Command Prompt™
Hyped for MS-DOS 11.0
- LankyBox01
- Scratcher
1000+ posts
jump block
“goto” is a feature that does the same thing as this so-called “Jump” block.Please tell me how that is relevant to anything. Haven't you heard of the batch programming language?
In case you're living under a rock, it's some advanced programming in Command Prompt™
Also, no support.
This isn't a .bat file, it's a .sb3 file
No advanced stuff.
- Mr_PenguinAlex
- Scratcher
1000+ posts
jump block
first of all “goto” is a feature that does the same thing as this so-called “Jump” block.Also, no support.
This isn't a .bat file, it's a .sb3 file
No advanced stuff.
you say no support just because there is a similar feature in a completely different programming language??
also, going to a specific part of a script isn't advanced
Last edited by Mr_PenguinAlex (Aug. 7, 2020 02:51:46)
- Xoffhia
- Scratcher
500+ posts
jump block
Support!
Yep, without this block i'd have to spend lots of time figuring the workaround by the broadcast blocks.
Yep, without this block i'd have to spend lots of time figuring the workaround by the broadcast blocks.
“God promises to make something good out of the storms that bring devastation to your life.”- Romans 8:28
Heyo. My fav colour is blue.
I love Mint choc chip ice cream.
I don't like pink.
I also love yellow.
Also, be moist
- Maximouse
- Scratcher
1000+ posts
jump block
NO SUPPORT.
Sorry for the big red text, but using jump/goto statements in any programming language is considered a bad practice. Instead you should use higher level control structures – in Scratch those are “repeat”, “repeat until”, custom blocks (with “stop this script” for exiting) and broadcasts. In my opinion Scratch should also add a “this loop” option to the stop block.
Sorry for the big red text, but using jump/goto statements in any programming language is considered a bad practice. Instead you should use higher level control structures – in Scratch those are “repeat”, “repeat until”, custom blocks (with “stop this script” for exiting) and broadcasts. In my opinion Scratch should also add a “this loop” option to the stop block.
- HighFlyer222
- Scratcher
100+ posts
jump block
oh yeah finally someone suggested the annoying goto
I agree with Maximouse here, once I wanted GOTO in Python for my first code, a command line calculator, and I wanted it to be like this:
But then I discovered it was easily workaroundable with this, and it also avoid spaghetti code:
Another reason to not support is, where will each jump block jump to? How will you remember that? Like this:
Can you understand what the code does?
This post in a nutshell:
No support
I agree with Maximouse here, once I wanted GOTO in Python for my first code, a command line calculator, and I wanted it to be like this:
when green flag clicked
::motion
ask [Please choose an operation (1:Addition 2:Substraction 3:Multiplication 4:Division)] and wait
if <not <<(answer)>(0)> or <(answer)<(5)>>> then
say [Invalid operation] for (2) secs
jump::motion
end
But then I discovered it was easily workaroundable with this, and it also avoid spaghetti code:
when green flag clicked
repeat until <<(answer)>(0)> or <(answer)<(5)>>
ask [Please choose an operation (1:Addition 2:Substraction 3:Multiplication 4:Division)] and wait
if <not <<(answer)>(0)> or <(answer)<(5)>>> then
say [Invalid operation] for (2) secs
end
end
Another reason to not support is, where will each jump block jump to? How will you remember that? Like this:
jump::motion
if <(0)>(1)> then
say [What?]
::motion
end
::motion
repeat until <(variable)=(8)>
jump::motion
change [variable v] by (1)
end
Can you understand what the code does?
This post in a nutshell:
No support
Last edited by HighFlyer222 (Aug. 7, 2020 08:41:30)
Suggestions forum is love, suggestions forum is life
- Discussion Forums
- » Suggestions
- » jump block