Display text with expression + Text

MammothMammoth Member Posts: 640
edited November -1 in Working with GS (Mac)
So What I want to do is put an expression and text in the same box. Can this be done?

In code it would look like this.

Game.score" /500"

But that doesn't work. Im sure there is a very simple solution I am over looking :)

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    I believe it would be

    game.score.."/500"

    ___________________________________________________________________________________
    Project Help from Tenrdrmer Click Here

    GS BubbleBall Template HERE!!
    Stacks Level Selection Template HERE!!
    Expanding Option Menu Template HERE!!
    Tenrdrmer's Menu # 3 HERE!!
    AppSolute Entertainment on Facebook
    AppSolute Entertainment on iTunes
  • JeffreyShimaneJeffreyShimane Member Posts: 372
    If that doesn't work, you can create a text attribute (Text1) with the text " /500" (without the quotes). Then in Display Text, add the Text1 attribute after the game.score attribute.
  • MammothMammoth Member Posts: 640
    I knew it was something simple thank you so much guys :)
  • JeffreyShimaneJeffreyShimane Member Posts: 372
    I believe I used the text attribute method because I wanted to use spaces in between words and I couldn't get it working with just the ".." method. For example, I wanted something like the following text to appear on screen:

    Round X - N Objects Needed

    I put "Round" in one text attribute. The X came from an integer attribute that automatically incremented by 1 after every round was completed. Then I put " - " in another text attribute. The N came from another integer attribute that increased by a certain amount every round. Finally, I had another text attribute with the " Objects Needed" text. Putting all those attributes in one Display Text allowed me to create one dynamically updated actor that automatically showed what round it was and how many objects were needed.

    Hope that's helpful!
  • djmoyadjmoya Member Posts: 16
    putting .."texthere" after an expression or "texthere".. before expression worked perfectly thanks everyone! :)
Sign In or Register to comment.