New line in expression editor?

11clock11clock Member Posts: 450
edited November -1 in Working with GS (Mac)
I'm trying to display text to look like this:

"Stock:
[game.steel_stock]"

However, I'm not sure how to do this. I have to use the expression editor in order to show the variable, and the expression editor ignores the new lines. I've tried this:

"Stock:"..
game.steel_stock
The expression editor ignored the new line and placed everything on one line.

Then I tried this:

"Stock:
"..game.steel_stock
I got "Invalid Expression."

So how do I display the text the way I want to?

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Hey there you can actually do it. it is just a bit tricky to get it right.

    For Your Example this would be the code to use.

    "Stock: \n".. game.Steel_Stock

    the important thing is \n to get the new line, and to get a space between the typed out words within your Quotes you use option+space.

    Hope this helps.
  • BackUpAndDownBackUpAndDown Member Posts: 685
    Thats pretty nifty. Has anyone ever posted a list of display text commands like these before?
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    No, I don't think I have ever seen anything but this ever mentioned as commands we can use to be honest. I went ahead and made a demo showing its use in a much longer form.

    http://gamesalad.com/game/45451

    Its downloadable in GameSalad. the online thing is not loading for me right now. seems several people are having the same issue. http://gamesalad.com/forums/topic.php?id=33362
  • Rob2Rob2 Member Posts: 2,402
    BackUpAndDown said:
    Thats pretty nifty. Has anyone ever posted a list of display text commands like these before?

    The whole subject of multi line text has been covered frequently but unless you use google to search the forum you might not find it.

    Synthesis did a great post on the subject but the web has eaten most of it.
    http://gamesalad.com/forums/topic.php?id=10507

    This is probably the best of the rest as it points you in the right direction
    http://gamesalad.com/forums/topic.php?id=10483#post-76695 (no surprise to see that coming from ORBZ) for further investigation ->

    http://itee.uq.edu.au/~comp2303/Leslie_C_ref/C/FUNCTIONS/escape.html

    many of which work .
  • 11clock11clock Member Posts: 450
    I got the new lines to work. The stock market game is going great so far and I'm surprised how quickly I can make a table game! Already 2 days and I got the main game working. Now I just need to get it to actually end and add a store where you can purchase powerups between games using the money you earned.
Sign In or Register to comment.