Adding A Space In The Expression Editor

osucowboy18osucowboy18 Member Posts: 1,307
edited November -1 in Working with GS (Mac)
Hey there everyone,

I've got a quick question for you. I am trying to use the Display Text behavior in my Next Level actor to show the user what level is next in the game. In my Display Text behavior, I've got the following:

"Level"..(game.Current Level + 1)

Let's say game.Current Level is equal to 1. The output with the above statement is Level1.

So, my question is, how do I insert a space between the string "Level" and the value of game.Current Level? I tried hitting Option Space on the keyboard, but when I do that, it says the expression is invalid. Any ideas?

Thanks,

- Alex

Comments

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    Make the text "Level" an image actor by itself, and use the attribute to display the level number. That way you can spread them as far apart as you want.
  • POMPOM Member Posts: 2,599
    Use option+space , to make space ...
    so the result should be :
    "Level "..(game.Current Level + 1)

    Roy.
  • osucowboy18osucowboy18 Member Posts: 1,307
    P-O-M said:
    Use option+space , to make space ...
    so the result should be :
    "Level "..(game.Current Level + 1)

    Roy.

    Thanks for the suggestion Roy, but when I tried it, the only thing displayed was the text Invalid.

    Surely there must be another way to accomplish this besides just adding the level text to the actor's image. But if all else fails, I guess that's what I will have to do.

    - Alex
  • osucowboy18osucowboy18 Member Posts: 1,307
    Ok guys, I figured out what I did wrong. Originally, I had the following expression:

    "Level " ..( game.Current Level +1)

    It produced the Invalid Expression result. Then, after taking a another look at it, I discovered I had one too many spaces :) The statement below does produce the desired result.

    "Level "..( game.Current Level +1)

    Thanks for all your help everyone!

    - Alex
Sign In or Register to comment.