Strings and Attributes

when making an object display text, is it possible for it to display a simple string (such as "score") and then an attribute? (such as the score?) so in one object, it'll say "score: x" (x equals score)? I tried using text attributes, and that didn't do anything.

Having trouble with your game? Sounds like a personal problem.

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited January 2013
    Display Text:

    "Score: "..Game.YourScoreAttribute
  • ericzingelerericzingeler Member Posts: 334
    edited January 2013
    yes...

    use ".." (without quotes) to add another string to a display text or log debugging behaviors.

    Example:

    To display this: Score:50pts

    Do this in expression editor: "Score:"..[ScoreAttribute].."pts"

    If you want spaces... because spaces aren't accepted in expression editor you'll have to populate a dummy text attribute and work it in. Like so:

    To display this: Score: 50 pts

    Do this in expression editor: "Score:"..[dummySpaceAttribute]..[ScoreAttribute]..[dummySpaceAttribute].."pts"

  • SocksSocks London, UK.Member Posts: 12,822
    edited January 2013
    If you want spaces... because spaces aren't accepted in expression editor you'll have to populate a dummy text attribute and work it in . . .
    Just hit alt+space bar for a space.
  • ADSentertainmentADSentertainment Member Posts: 397
    yes...

    use ".." (without quotes) to add another string to a display text or log debugging behaviors.

    Example:

    To display this: Score:50pts

    Do this in expression editor: "Score:"..[ScoreAttribute].."pts"

    If you want spaces... because spaces aren't accepted in expression editor you'll have to populate a dummy text attribute and work it in. Like so:

    To display this: Score: 50 pts

    Do this in expression editor: "Score:"..[dummySpaceAttribute]..[ScoreAttribute]..[dummySpaceAttribute].."pts"

    Display Text:

    "Score: "..Game.YourScoreAttribute
    Alright, thank you!

    Having trouble with your game? Sounds like a personal problem.

  • ADSentertainmentADSentertainment Member Posts: 397
    If you want spaces... because spaces aren't accepted in expression editor you'll have to populate a dummy text attribute and work it in . . .
    Just hit alt+space bar for a space.
    oh, that's useful

    Having trouble with your game? Sounds like a personal problem.

Sign In or Register to comment.