attribute + text in function 'display text'?
jsorr2
Member Posts: 279
I was wondering how to display an interger value as well as text inside the Display Text function?
E.g.
Display Text: I have 'game.X' apples.
X = 9
I have '9' apples.
Best Answer
-
jamie_c ImagineLabs.rocks Posts: 5,772
Use the expression editor and make the text field look like this:
"I\32have\32"..game.X.."\32apples."
The \32's show up as spaces and the .. before and after game.X concatenate the text together with the attribute value.
Answers
Works like a charm, thanks Jamie
Sweet!
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Do you know you can also just hit option+space to get a space, this has the obvious advantage of not\32making\32your\32text\32unreadable\32in\32the\32expression\32window !
No Idea what the option button is as I use a windows keyboard.
Oh well ! Personally I'd try all the obvious modifier keys, but if that's too much of a stretch then at least you know \32 works.
It was alt+space. That helps heaps, cheers @socks
@Socks, yeah I was aware of that, but to avoid the 'cross platform' issue I stuck with the \32.
It's certainly worth pointing out though, thanks.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page