Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » How to make a newline in scratch?
- Prime689
-
Scratcher
1000+ posts
How to make a newline in scratch?
Scratch's coding language is not based on text syntax. That being said, one couldn't prompt a new line. All you have to do is stack code in the form of blocks like a jigsaw puzzle.
Last edited by Prime689 (Dec. 25, 2022 18:21:56)
- mybearworld
-
Scratcher
1000+ posts
How to make a newline in scratch?
It is possible. Here are the steps on how to do it:
- Create a new project.
- Create a new variable. It will contain the new line character, so name it something that represents that, like newline.
- Put this block in your project, but don't run it:
set [newline v] to [SOMETHING_RECOGNIZABLE]
- Save the project to your computer.
- Rename the file from xyz.sb3 to xyz.zip.
- Drag out the project.json file onto your desktop.
- Right click > Edit that file.
- Search for SOMETHING_RECOGNIZABLE and replace it with:
\n
- Save the file.
- Drag the edited file back into your xyz.zip.
- Rename xyz.zip back into xyz.sb3.
- Open that project.
- Click the block to run it.
- Now the newline variable should contain a new line - try it out using the following:
say (join [Hello] (join(newline) [world]))
- Discussion Forums
- » Questions about Scratch
-
» How to make a newline in scratch?