Typewriter Text Word Wrapping

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hey everyone,

    First and foremost I want to say that yes, I know of the older threads involving typewriter text and word wrapping. The thing is, they're all older topics and missing some crucial example files that I think could have helped me solve my issues with it. I found some example files which led me in the right direction, but I still can't quite get the hang of it. So I was hoping for a fresh perspective on it as I'm really struggling to understand how to do it properly.

    The typewriter effect I refer to is the text you typically see in rpg games, kind of like it's being typed out as you read it. I have that down just fine. The problem is when the text being output goes on for more than one line. The text will keep writing out until a word overlaps the edge of the text box, and then bring it down to the next line. This doesn't necessarily sound bad on paper, but it looks really sloppy and gets hard to read in execution.

    I have an attached an mfa to show you guys and example of what I have right now. I have followed a few different examples and still can't get the text to wrap properly as I'm having some trouble grasping how the code works.

    Any ideas of what I am doing wrong? I appreciate any help at all!

  • This is no easy task! Or if it is, at least I don't know about it. There might be extensions that allow wordwrapping.

    However, I made you an example. I might have overcomplicated this, so if anyone says it can be done simpler, then listen to them.. :D

    You will need the CalcRect extension and the String Tokenizer extension.

    This example scans the text word for word and if the next word doesn't fit into the line, it makes a linebreak. Quite simple, actually.. :)

    Enjoy!

  • You're welcome!
    There are things you can do to get rid of some objects, like using global or alterable values instead of counters. Also, if you plan on using lots of paragraphs, and don't want to manually type in [New Paragraph] all the time, you can use String Parser 2 to replace newline$ with "[New Paragraph]" on the actual string before doing anything else with it.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!