Bug: Display text is displaying all characters

Goodnight GamesGoodnight Games NYCMember, PRO Posts: 184
I'm using display text for some of my game and in order to put spaces in I used the \n command. In gamesalad itself it's fine and you can't see the characters but when I upload it to the web it displays everything on screen.

I've also put line breaks in for multiple lines of text and those don't work either it just displays as one long sentence.


Has anyone had any experience with fixing this? Thanks!

Comments

  • ShmirlyWhirlShmirlyWhirl Member Posts: 189
    As long as it's in quotes, I've never had a problem with Display Text showing the spaces. I have never used a special character for that.
  • Goodnight GamesGoodnight Games NYCMember, PRO Posts: 184
    So wait how should it be set up with the quotes just so I can go back and double check everything?
    \
  • Goodnight GamesGoodnight Games NYCMember, PRO Posts: 184
    Ok just looking at my one it's phrased like this and it shows up on the web

    "x"..game.comboCounter.."\nScore:"..game.comboScore

    The other that's showing up is

    "\n\n\n Collect"
  • Goodnight GamesGoodnight Games NYCMember, PRO Posts: 184
    Yeah it's literally everywhere I use the \n so something is wrong there I'm not sure of the phrasing
  • Goodnight GamesGoodnight Games NYCMember, PRO Posts: 184
    Ok last look should I be doing it as "\n".."\n".. instead of grouped together?
  • Goodnight GamesGoodnight Games NYCMember, PRO Posts: 184
    Alright last part it seems to only be doing it with the web version and not the desktop version. Does anyone have any ideas?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I can't say I've used DisplayText for a web-based game but normally you can add the newline character \n anywhere in quotes. You don't have to separate it, so any of those should work. Just make sure you are clicking on the expression editor to enter them.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Goodnight GamesGoodnight Games NYCMember, PRO Posts: 184
    Yeah I clicked on the expression editor and tried it both ways. This only happens in the web version, I did stand alone and it's just fine.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited March 2013
    Ok just looking at my one it's phrased like this and it shows up on the web

    "x"..game.comboCounter.."\nScore:"..game.comboScore

    The other that's showing up is

    "\n\n\n Collect"
    Hi @neondevil Perhaps try your two examples a different way, like this:

    "x"..game.comboCounter.."\n".."Score:"..game.comboScore

    "\n\n\n".."Collect"

    See if that does it.

    -------

    Here's a tip if you don't know: if you wanted a space after a word in the Expression Editor, "Score:" for instance, press alt-spacebar to get the space, like this: "Score: "

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • Goodnight GamesGoodnight Games NYCMember, PRO Posts: 184
    I tried the first version didn't work and the second version all that displayed was the "\n\n\n" so weird
  • Goodnight GamesGoodnight Games NYCMember, PRO Posts: 184
    edited March 2013
    Wait I just realized I have the whole thing set to legacy iphone. Think that'll screw things up?


    Edit: Nope that didn't work either
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited March 2013

    That's strange; either way should work...not sure what's going on either now, sorry I couldn't help...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited March 2013

    @neondevil

    OK, take two: try replacing all instances of \n with \r instead.... see if that works on all versions...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Wait I just realized I have the whole thing set to legacy iphone. Think that'll screw things up?
    But the platform just determines the scene size. So I wouldn't think that would affect it.



    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.