GMS 2 Insert line break

Discussion in 'Programming' started by Carlos PT, May 11, 2017.

  1. Carlos PT

    Carlos PT Guest

    I'm trying to create a textbox that reads a string and shows it. I need to make it so it can jump to the next line if the string is longer than the box. I have followed a tutorial that uses the symbol "#" to insert line breaks manually. My problem is this is not working using GMS2 (the tutorial is in 1.4). Trying this it writes the symbol itself, instead of creating a line break. How can I insert a line break manually in GMS2? Is there another symbol? Thanks in advance.
  2. Hyomoto

    Hyomoto Member

    Jul 7, 2016
    The new character code is \n, you can find it under the strings section of the manual.
    Bentley, big ant and HayManMarc like this.
  3. HayManMarc

    HayManMarc Member

    Jun 21, 2016
    ^The manual is your friend. Especially "search" and "index". Get to know them and they will have your back most of the time. ;)
    Bentley and big ant like this.
  4. sylvain_l

    sylvain_l Member

    Sep 18, 2016
    you now that if you want to draw a text in a box, there is a function that handle the wraping for you ?

    (of course don't mind my saying if you are just doing it yourself for learning, handling wrapping is a good little exercice)
    Bentley likes this.

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