This is an improved version of my print_number script.
Download this project!
Download the one sprite and 6 scripts of "print_decimal" and open it in Scratch
Project Notes
Printing numbers with the stamp tool.
This program has a single sprite called digit, which responds to a message print_number and three global variables: print_x, print_y, and print_number.
When print_message is broadcast, the digit sprite
prints out the number by stamping the digits with the bottom right of the final number at print_x, print_y.
This version can print up to 15 places to the right of the decimal point, controlled by print_after_decimal.
After the call, print_number is 0 and print_x is to the left of the printed number. print_y is unchanged.
There is a simple test script on the stage:
clicking on stage prints the number, space clears the display.
Comments
You need to be logged in to post comments
Add a Comment
Cool. How do you input numbers with decimals? After Pi the slider only shows whole numbers
It's the slider problem. You can only find whole numbers on the slider.
(view all replies)VERY useful!! Thanks for sharing.
awesome!
See print_scientific at (link to project) which now supports scientific notation as well.
Nice! I was looking for something like this, thanks.
The purpose of print_decimal is to be used in projects. Yes, you may use it, though I would appreciate being given credit in the project notes.
May I use this in a project?
This is an improved version of my print_number script.