Kinda text tool for printing numbers strings

Hi! I badly needed a text tool to write numbers in realtime. Pen & "costume from text" tools didn't help. So I've made a replacement. Here is a sample project:


The idea is simple: there is a sprite with costumes representing digits from a font you like. This sprite has special block Numbers%20label%20test%20script%20pic%20(1) that creates clones of this sprite, placing them in right positions and setting their costumes to digits of the number you want to write. It is rather fast!

Update: You can now send commands (show, hide, move, set effect etc) to a particual text label with block Numbers%20label%20test%20script%20pic

Nice! I was going to ask "What's wrong with WRITE?" until I saw that you want different digits different colors.

Two little bugs:

  1. The bounding box on the digit 1 costume is too close, so when you write the number 11111 you just see a solid block.
  2. You never initialize CURRENT X so the numbers start at x=0 regardless of the x input.

Not just different font & colors. Yes, it's good side effect. But the thing I need most is text labels, which I can update independently and fast. This scheme solves this task. If you call "WRITE NUMBER ... AT POINT..." block in the same point (x, y) several times, it will not print them on top of each other overlapping, but just update the existing text at this point and won't bother other text labels. It allows to work with several text labels, updating them when you need it.

The biggest problem with WRITE is that you can't update a particular text. You must call "clear all" and then redraw all the text labels.

  1. Yes, I'll add a space between digits, it's quite simple.
  2. Oh, thank you. Haven't noticed :slight_smile:

Oh, I see. On the list for someday is multiple pentrails layers, which will take care of that for you. But I'm not promising when...

That would be a great feature!

Added "LabelID" for controlling particalar label and a block Numbers%20label%20test%20script%20pic
for applying a command (show, hide, move, set effects etc) to a label with known LabelID. Test project now shows how to handle several labels independently.

It also would be great if we could draw pen on sprites, or can we? I haven't tried.

Not that I know of, but you could fake it with a small dot costume that you keep pasting as you move.