Printing text using arrays

@grazer You can’t even believe it yourself while you’ve created flowlab. Nice :smiley:

@Latif3
grazer is used to everyone on the forums requesting stuff and asking tons of questions. Meanwhile, Wizardry is basically saying “I don’t need to wait for new features, I’ll make my own”, and grazer is mind blown every time.

Here’s an example of interaction with the text field, so instead of simply printing stuff you can use it like an interface to select things or have dialogue trees. some extra stuff/labels are shown that was used for debugging which you can ignore

Oh, very nice. Now we are getting into printable menus? I hadn’t even considered that as an idea. Now you’re blowing my mind. What are you going to do next? Make a way to type back? You know, for name creation, file saving, nicknaming your Pokemon or whatever, or one of those text based adventure games? I could see that.

What are you going to do next?
Right now everything is built with regular game objects meaning nothing will display right as soon as the player moves, if the camera is following the player. I tried quickly converting everything to UI objects earlier but it doesn't work, i rely too much on proximity for a lot of things. I have to make it so when a dialogue is triggered all the text stuff relocates to the player's position. once that's done i just have to make like a background behind the text and to clean up some stuff, it's already functional enough and with menu interaction pretty useful

Inputting text to set a player name should be easy, i don’t know a good way to store the character’s name without saving each character on its own but that’s probably alright

Yeah, you have to store each character on its own, saving a number for each letter that is entered out of like 12 Max.

Is it actually Impossible on the GUI? I figured you would do something like, there is no proximity or anything like that, instead, it uses numbers, and sends a message per number, to objects on the GUI, for each letter slot. If you don’t get what I mean by that, let me know, and I’ll explain it more. What you are doing is having a blip pan to the right, and then teleport down, when you could just be using numbers for each grid text box. You could use an array for that too, for example, 30 text boxes, 30 numbers in the array, you skip a line, you skip to 20, or skip to 30, or Tab 5 boxes for a gap. Pressing a or whatever button goes to the next array of dialogue sets all the boxes to zero, or whatever the blank space number is. Or you could just make it simple and have a bunch of spaces instead of a separate array, so it always prints in order, and never skips a line. That should work. I might test it myself.

That should prevent any problems where it accidentally skips a letter, like mashing enter fast does it in your original example. You should be able to make the text move as fast as possible, using an array order of messages instead of a blip.

@CrimsonBlackGames

Does that work with clones now?
Won’t it be jiggly and slightly desynced? The blip has to be very precise, which was why I suggested messages instead of a blip.

@Wizardry I got ya-

For everything that needs to stay onscreen, use an once and an extractor pair that saves coordinates, get a pair of expressions as well. Youll also need two mailboxes

Connect an extractor to A, and Connect a mailbox to B and set to whatever Axis youre using. Connect to a position. Repeat for the other axis.

Then- In the character, connect the scrollview outputs to a message pair, sending the coordinates of THAT to the elements

This should keep them in position relative to the top left corner of the screen- I think

That should prevent any problems where it accidentally skips a letter, like mashing enter fast does it in your original example. You should be able to make the text move as fast as possible, using an array order of messages instead of a blip.
Original example hasn't been touched since being posted, I've rebuilt it a few times so it works a little different now. right now there's just a timing issue with word wrapping and a character can be skipped, that's the only issue i've found. this is the current version http://flowlab.io/game/view/941374 just press 1/2 to clear the debug stuff in the beginning. "printer" is storing all the text arrays in a bundle, "player" has the text triggers in another bundle, these and "char" are basically all it needs to print, "button" is for input, everything else is a formatting object controlling things like wordwrapping or indent positions, starting positions

Maybe it’s possible for gui but i don’t like how gui and regular objects are in separate object libraries you have to switch between to edit, and some behaviors are missing

This should keep them in position relative to the top left corner of the screen- I think
Something like this yeah, although since the game mode changes when dialogue displays to prevent player movement, the text objects only have to relocate once whenever the dialogue is triggered, not a constant update

So I was working on a GUI version of this, using a different method, but then I realised I would have to upload every letter and number for every single animation for every single box frame printer, and man, that would take a few hours. I requested animation uploads from grazer, so then we can share our animations and text between other people or our other games. How’s your moving box attempt going? Have you got it staying up in the corner moving stable and whatnot? Let me know, so I can decide if this GUI test is a waste of time or if I should keep working on it. It’s turning out to be more annoying than I had planned in my head. Parent groups don’t work how I hoped they would, and I kinda wish child objects shared parent animations. That would save so much time, in theory.