working with Display Text

jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
edited November -1 in Working with GS (Mac)
Is it possible to display multiple attributes, with some static text, in a single display text actor? I want to display time, which requires 3 attributes, hours, minutes and seconds. I'd like to just display it like this:

hours : minutes : seconds

Would that be possible?

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    the answer is yes:

    game.Attribute..":"..game.Attribute

    now just to figure out this % symbol, it aint working right.
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    It would be great if it was also possible to insert a return to display high scores in a column.

    So far I was unsuccessful (even tried inserting a return in a text attribute)
  • rmvz3rmvz3 Member Posts: 4
    Hi all. I've just starting to play with Gamesalad and I'm totally shocked how fast you can do things here.

    I have a question about jonmulcalhy answer. Why can't I add spaces to the text between "" ?. I'd like to display something like "You have "..game.lives.." lives left" but I can't insert spaces between quotation marks. What am I missing?
  • MotherHooseMotherHoose Member Posts: 2,456
    @mvz3 …yes… as this is an expression … you have to type a space as [option]+[space] … just hold down the option key and press spaceBar

    for a return: .."\n"..
    EX: gameAttribute1.."\n"..gameAttribute2.."\n"..gameAttribute3    … etc.

    think "\r" might work for a return … but I like newLine "\n"

    @};- MH
  • rmvz3rmvz3 Member Posts: 4
    Thank you very much, MotherHoose. I'll try that way.
  • Rob2Rob2 Member Posts: 2,402
    Some standard C escape sequences work - always test on device !

    \b back space
    \f form feed
    \n newline
    \r carriage return
    \t horizontal tab
    \v vertical tab
    \\ backslash
    \" double quote
    \' single quote
  • mars3725mars3725 Member, PRO Posts: 1
    would it be the same if you were using the new line operator with regular text for example:
    I like pie and.."\n"..I like apples
  • MotherHooseMotherHoose Member Posts: 2,456
    you can copy paste text into the displayText behavior

    add noteBehavior
    type in:
    I like pie
    I like apples

    copy those 2 lines … paste in Text: for displayText
    note that the newLine is there without command
    or you can just type in that Text field using [option]+[return] for newLine

    have copied formatted text from textEdit and pasted in displayText
    and formatting stayed (ex: bullets)

    but in expressionEditor where you want an attribute's value then you should use the "\n"

    play around with it!

    image MH
Sign In or Register to comment.