1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

GMS 2 [SOLVED] How to Detect the Amount of Lines in a String

Discussion in 'Programming' started by Spencer S, Feb 14, 2018.

  1. Spencer S

    Spencer S Guest

    I'm using the function:
    Its odd, some things behave differently than I expected, but overall I get it. However, I need to detect how many lines are drawn with randomly sized strings of different words. With the "width" argument in this function, you can specify how many pixels the string should span, and if the width of the drawn string goes over the specified width, then it starts a new line. I need to be able to detect how many lines are drawn, with strings varying in size of random words.

    Does this make sense? In other words, I need to be able to automatically detect when the function starts a new line.
    Last edited by a moderator: Feb 14, 2018
  2. The-any-Key

    The-any-Key Member

    Feb 2, 2017
  3. Spencer S

    Spencer S Guest

    Its in GMS2 as well! Thank you so much!

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice