Re:Scratch is a big deal
by yCombLinks on Saturday July 16, 2022 @04:20PM
(#32121583)
Show the variable how? There's not a console, there's not a way to simply display a string or character. Scratch revolves around programming sprites to do things
Tick the checkbox next to the variable in the block palette. That creates a variable watcher on the stage. You can also right-click the watcher to change it to a large readout, displaying the variable contents within a minimal frame.
Also if you get Scratch Addons (https://scratchaddons.com/) and enable the Debugger addon it adds a console and blocks to log to it.
Re:Scratch is a big deal
by AzzieElbab on Saturday July 16, 2022 @05:56PM
(#32122330)
Something as simple as this should not require add-ons. This isnt js and `leftPad` you know
Re:Scratch is a big deal
by mynameisvlad on Sunday July 17, 2022 @09:43AM
(#32126679)
Why would kids need a full debugger with console? That's far from "simple".
Every variable has a checkbox they makes it show on screen: https://en.scratch-wiki.info/wiki/File:Checkbox_to_show_or_h...
There is also a command block to show or hide it dynamically.
You could also display it with a say or think block.
Re:Scratch is a big deal
by ryankrage77 on Saturday July 16, 2022 @06:57PM
(#32122711)
Just have a sprite 'say' the variable
I suppose I might be missing something, but if you just care about displaying the number, rather than any particular styling, you can just show the variable, right?