Split Text/Number into list

You don’t know how to split letters/number? Then this tutorial is for you. Note: This tutorial might be the same to older ones but I have some more additions in this tutorial, which might be a lil’ different.

What does split text even mean?

When talking about ‘split text’, I usually think about taking a text into many smaller pieces of words, which is called ‘character’. Characters just like what you see on your computer keyboard, every single one of them that you’re using to type are ‘Characters’ like what you see on your screen. When you put them in Text behavior, all of them have their own index that starts counting from 1 to its length. Ex:
Lazy dog
=
12345678
(kinda weird but most of the index in a text from the coding language I know starts at 0 except Flowlab)

How to split them?

It’s actually SO easy in coding, that’s when you really understand it, it’s actually harder than that, I struggled pretty much on it when I try to make a mechanic that can split out text to identify and find a specific frame of an object. That’s why I came up with this tutorial so you won’t struggle like me.

1) Prepare:
Behaviors that you will need:

  • 2 Text.
  • Text Length.
  • Repeater.
  • 2-3 Number.
  • Text/Number List.
  • Once (optional)

2) Simple:


Since I haven’t applied this to my game yet, so I use Once to send the signal and get the text instead, the way you do it just like in the image and most of them are important so it should looks like that. “But dude, why do you have to use 2 Text behaviors instead of 1 that is wired direct to the list?” you may ask, it’s because when the Once behavior sends the signal, it will also send EVERYTHING in the Text behavior directly to the list but I don’t want it to happen so I use 2 Text behaviors.
3) More advanced:
Ok, now we know what it should look like, right? Let’s get into something more advanced. Let’s just say that I’m making an ID that will merge 2 last numbers together when that ID is 3 index long, so how do I do it?

Try it by yourself first if you can get it right, then check my code


I don’t think y’all will do the code but check my code first so whatever, the Router is to place characters) separate from each other and use ‘+’ when I need to merge them in the correct place.

I think this tutorial is kinda like ‘Yo check it out this thing, look at it and do it by yourself, lil boy.’ more than explaining directly to the problem of ‘How it actually works?’, but I’m not really good at explaining stuff so my bad if you’re confused and get lost from this tutorial. If there’s something wrong, correct me and let me and everyone else know so we can understand it together. Hope this helpful!

1 Like

Split text is my best friend