Few lines of text

IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
edited November -1 in Working with GS (Mac)
Hello,
Did anyone manage to put few lines of text (one under another) into one actor, and iPhone/iPad/iPod is displaying them properly?

Comments

  • synthesissynthesis Member Posts: 1,693
    Info about creating and formatting multi-line dynamic display text is here:
    http://www.gsproforum.com/viewtopic.php?f=21&t=111
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    Yes, I saw your topic about it on this forum, and I wrote a question. I'll copy it here:

    I checked this topic on GSProForum, and I have one question: I have many lines of dialogues in my game and sometimes they are separated in few lines. Now I have an actor for every line of dialogue.
    Is it possible to use your tip to create few lines of defined text with one actor, and iPhone will display it as few lines?
    I'm asking because making a different actor for every line of text is very tiring, and iPhone doesn't recognize CTRL+Enter command in Display Text behavior.

    Thank you.
  • StusAppsStusApps Member, PRO Posts: 1,352
    MarcinMakaj said:

    Is it possible to use your tip to create few lines of defined text with one actor, and iPhone will display it as few lines?

    Thank you.

    That's exactly what the link synth posted tells you how to do. Read it carefully, the reason he has different attributes is so you can change the text without needing a new actor. The bit you want is the /n bit.
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    I've got it :) Thank you
  • Rob2Rob2 Member Posts: 2,402
    \n works for me on a 3gs using the viewer. So "Nice\nNew\nFormatting" gives me three lines of text...make sure you enter with the expression editor and click the green tick!
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    For me, sometimes it works fine on a 3G using the Viewer, sometimes I have white block, and sometimes text is smashed. I'm trying to figure out how to solve it.
  • ORBZORBZ Member Posts: 1,304
    \n should work on all devices. It's the standard escape sequence in almost every computer language for newline (\n = newline) It's how it's done in C it's also how it's done in Lua and since Lua is what GameSalad runs in, and C is what Lua runs in, I see no reason that \n wouldn't work on any device.

    You have to enter it in the expression builder in GameSalad and you need to put it inside double quotes.

    "Line 1\nLine 2"

    If i'm wrong though and there is some device out there that doesn't work properly i'd be really curious to know why because that'd be wonky as hell.
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    I found out why, sometimes on Viewer there is white box instead of few lines of text:
    I put about 4 lines in one Display Text behavior, in this situation I get white box. When I put them in two Display Text behaviors (of course with "\n"), then all works good on my iPhone 3G using the Viewer.

    I still don't know why some of these texts are blurry, and some not on my iPhone (they are in the same actor).
  • ORBZORBZ Member Posts: 1,304
    Put your text in a variable and the dispay the variable. See if that works.
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    Excuse me, maybe my english is to poor, but I don't understand what do you mean by variable, and how to do it.
    I'd be gratefull if you explain it to me.

    Thank you.
  • StusAppsStusApps Member, PRO Posts: 1,352
    as in a text attribute
Sign In or Register to comment.