Questions tagged [mit-scratch]

Scratch is a graphical drag-and-drop language developed by MIT.

Scratch is a graphical drag-and-drop language developed by the Lifelong Kindergarten Group at the MIT Media Lab. It is used in a number of grade schools and other educational institutions to teach principles of programming.

It primarily focuses on developing games or other graphics-intensive applications, but it can be used for other tasks as well.

The code interface consists of 'blocks' that are dropped into the editor window and then hooked together to perform tasks. Manipulation of 'sprite' objects is the main focus of the language.

Scratch has inspired several similar programming interfaces, which use its block-manipulation approach to programming.

Other block-programming tools include Snap (also known as Build Your Own Blocks), which extends Scratch with first-class data and better routine-creation tools, Enchanting, which allows programming the Lego NXT controller, and Google's Blockly, which provides generic tools to allow any programming language to be programmed with a block interface. Also Scratch Jr, which focuses on coding for young children (aged 5-7 years), the blocks are placed horizontally instead of vertically like Scratch, as younger children found this easier to understand.

Scratch's official wiki contains documentation and tutorials about all features of Scratch.

Scratch's official discussion forums also contains information concerning Scratch.

Books:

284 questions
1
vote
3 answers

How do I use the Random Function In Scratch for a Gain and a Loss

I want to use a random function for my code. I want the user to be able to click the Bitcoin symbol and lose anywhere from 30,000-50,000 dollars or gain anything from 30,000-50,000 dollars. I do not want to do something where it picks a random from…
Janice En
  • 31
  • 4
1
vote
3 answers

Is it possible to wait for either button A or button B?

This is code that waits for an event coming from button A. control.waitForEvent(Button.A, EventBusValue.MICROBIT_EVT_ANY) I want to wait for either button A OR button B to be pressed. Is this possible? EDIT I know that in Scratch this is possible…
amer
  • 1,528
  • 1
  • 14
  • 22
1
vote
1 answer

MIT SCRATCH BUILD How to create custom blocks or change text

I Cloned the repository Scratch-GUI I did npm install & npm start Works perfectly in http://localhost:8601/ , now, I have to change the text&color of the pre-built block without changing the result(change the color of one = block and change its…
Neptotech -vishnu
  • 1,096
  • 8
  • 23
1
vote
1 answer

Image to hex triplet(Any language)

Welcome, this is not that tough please help I use a platform (Scratch). I need to print an image using a pen (You may not understand what I mean in the above if you don't know the platform BUT) What I need is to convert the image (below), to hex…
Neptotech -vishnu
  • 1,096
  • 8
  • 23
1
vote
2 answers

Is there a way to have a delay in between code in p5.js

So I want to have a delay in my Draw function so that when I want to do Xoffset = Xoffset + 1.5 I do not go from 0 to 30 in a secnd, but I want there to be some delay in the code so that I can easily manage it. I usually use scratch and if you are…
1
vote
0 answers

How do I screenshot my Electron application of a Scratch project?

I essentially used turbo_warp packager to make an Electron windows application of a Scratch project and I'd like to know how we can press a button to screenshot the application window to make it a separate image so I can easily save it to my hard…
1
vote
2 answers

How to get the first letter of each word in a sentence in Scratch

I am working on Scratch right now and I am stuck on the code. I’m trying to make a password generator. But I just don’t know how to get the first letter of each word in a sentence
Linh Tran
  • 29
  • 1
1
vote
1 answer

Change the Value of Scratch Variables with a Bookmarklet

I am making an engine on Scratch that works with a bookmarklet to provide more functionality without creating a Scratch extension. I have had no trouble reading variables through the DOM when they are showing. However, I am trying to find a way to…
TheMirrazz
  • 11
  • 3
1
vote
4 answers

Anyone know of a scratch like program construction UI framework?

I quite like the drag and drop pluggable programming blocks in scratch ( http://scratch.mit.edu/ ) I'd like to be able to get users to create their own mini scripts using the same kind of technique... just wondering if anyone knows of anything…
Keith Nicholas
  • 43,549
  • 15
  • 93
  • 156
1
vote
2 answers

Where is the orange block that says 'Item (random) of list'? I am lost

I am taking an online coding course for beginners and we he is creating a randomizer that selects a random color from a list of colors that we created. I am trying to follow along step by step but I CANNOT find the orange block that he is using that…
1
vote
2 answers

scratch sprite not registering hit consistently

This simple shooter game is supposed to result in the sprite shattering and disappearing when hit. It will work maybe 40% of the time. Here's the link to the project and the relevant code block: https://scratch.mit.edu/projects/524150880/editor
andreithegiant
  • 215
  • 1
  • 10
1
vote
2 answers

Tell when one and only one key is pressed with logical operators

I'm helping someone with a project on Scratch, and it has a block , and I can tell if a key is pressed, (a, b, c, ...) or when ANY key is pressed. Using these booleans, any and (a, b, c ...), can I tell if one and only one key…
Davedude
  • 160
  • 10
1
vote
1 answer

My collision detection program for projectiles would not work in Scratch. (forever) If touching {wall} (whatever output)

I've tried multiple outputs for the program and nothing. I've singled out that some random program inside the sprite somewhere must be canceling out my program for that sprite. Here is the link to the project, just click "look inside" to see my…
Eggybunz
  • 21
  • 2
1
vote
1 answer

Can I clone sprite in WYSIWYG but not in code?

I have a sprite and need place several clones of it in the scene. I know how do it in code but the sprites have to be static all the time. I want to place and arrange them manually in editor before running the program. Note: I need the cloned sprite…
1
vote
1 answer

How does Scratch play sounds without any problem on mobile?

If you are familiar with scratch, you'll know that Scratch 3 was built to support mobile. Javascript audio isn't working on mobile devices shows that mobile doesn't support auto playback of audio Scratch seems to play audio without a problem... Does…
Coder2195
  • 268
  • 2
  • 13