Concept for text in flowlab

This is a concept! And this post is long! TL;DR at the end.


Just like a number, but stores text instead

Text count:

Input some text, and it'll output the number of characters.

Text expression:

Used to concatenate text. The expression is: `I like { A } and { B }` so the output will be `I like candy and chocolate`.

Some advanced functions will be:
{ A.ToUpper } to make A uppercase, so CANDY
{ A.ToLower } to make A lowercase
{ A.Slice(1, 4) } to slice text, this will start at 1 and it’s 4 characters long so it’ll be andy
Of course there are a lot more functions but I’m pretty sure grazer is familiar with this

Text filter:

Used to check certain conditions for text

Of course there are a lot more options:

Number box will disappear if it’s not needed:

Text box will appear if needed:

More than x characters - Passes if the input has more characters than the specified value
Fewer than x characters - Passes if the input has fewer characters than the specified value
Equal to x characters - Passes if the input has the same number of characters as the specified value
Is number - Passes if the text is able to be parsed to a number
Is blank - Passes if the input has no characters, or only contains spaces
Contains ... - Passes if the input contains the specified text
Starts with ... - Passes if the input starts with the specified text
Ends with ... - Passes if the input ends with the specified text

The specified value/text can be changed any time with the value input.

Text box:

A highly requested feature by @"Mhx Ar"

As you can see in the image, you can hide the background/border of the box. This would be useful for creating custom textboxes if you want them to look more fancy.

Set: Sets the text in the box
In: Ouputs the text in out
Enable: Enables typing in the box
Disable: Disables typing in the box
Confirm: Actives when the user presses ENTER on the box
Focus: Actives when the user clicks the box to type on it
Leave: Actives when the user leaves the box by clicking somewhere else
Width: The width of the box in pixels
Lines: How many lines the box can have (so basically the height)
"Allow any character" can be changed:

A few more notes

  • Label text can be changed with the label input
  • Alert can have 3 inputs to change the title, caption and button text. Useful if you want to display a score.
  • If you input a number when you're supposed to input text it'll convert it to text. For example if you input `64` to a text count it'll basically output the number of digits, so `2`.
  • If you input text when you're supposed to input a number it'll just ignore it. For example if you input `hello` to set a number nothing will happen.


  • Text behavior
  • Behavior that counts characters in text
  • Behavior to concatenate text
  • Behavior to check certain conditions on text (equal to 5 characters etc.)
  • Text box

Yes we really do need the text box.

It could be used for the player to name anything!

I would really like to have words typed word by word. RPG maker had it over 20 years ago, and many NES and SNES games too. It’s unusual to not have any simple way to tell a story without 5000 alerts or labels.

@“Mhx Ar” You would be able to do this with the text expression.

  1. Use an ease block, start from 0 and end with the total text count (you can use the text counter for this)

  2. Send ‘out’ from the ease block to A in the text expression. Then send the text you want to display to B. Make the expression { B.Slice(0, A) }

  3. Send the output of the expression to the label input to display the text

  4. It’s smart to make a behavior bundle of this

If you know Haxe, you should offer to make behavior codes for grazer and see if they work

lmao, “Haxe”

@MagmaDude100 Flowlab is written in Haxe, which is a programming language. Nothing crazy.

Oh, I thought he was trying to spell hax

Thanks for the all these thoughts about how we can deal with Text. I’ve been thinking about this for a while as well, and a lot of these ideas overlap with the kind of stuff I’ve had in mind.

One thing that I’ve had in mind that isn’t addressed in this thread is how to handle larger amounts of text data. Even if we have behavior blocks that handle individual units of text (usually called “Strings”), that’s not really sufficient for managing text data. For example, if we wanted to have NPCs that can carry on conversations like the RPG Maker screenshot above, we wouldn’t want to have a Text block for every piece of text.

I was thinking that we need some sort of “Data” block that could hold rows of text like:

  1. Hello
  2. I have a quest available.
  3. Do you accept?
  4. Bring me 7 rat pelts
  5. Have you completed your quest?
  6. Here is your reward: One n00b dagger

and it could have an input to select which text to display, e.g. “4” would display “Bring me 7 rat pelts”. This could even be a modification to the Label block, really.

@grazer Thanks for your response :slight_smile:

So you mean adding a block to store an array? That’s not a bad idea.

There’s only one thing: Let’s say you want one string in the array to display a score (like Your score was [insert score here]), that means the string won’t always be the same. If there were things like variable names you could do Your score was { score } and give a number block the variable name “score” so it’ll take that value (or you could use the existing label property for that, it’s currently useless).

I think this is also a better and more understandable way to concatenate strings instead of using a text expression. Every number and text block has a name and you can access the value by putting the name between { }.

Basically the animation frames of text storage? That’s a really great idea. I could get an enormous amount of usage out of that.

@“Mhx Ar” Yeah it’s like that.

It would be cool if we could store those arrays in save blocks too. You could use that to save your inventory items for example, the items you have bought or whatever you have in your game. Now we literally have to make a save block for every single item.

Woah! This is really cool. I personally don’t feel like I would use 90% of what @Latif suggests but its still supper neat. The primary thing I would request at this moment would be more options for the alert block, such as being able to add multiple buttons and change more things like alpha, font, text size, ETC

I don’t see the text counter.

BTW, I’m a newbie to this, though pretty ambitious