Attribute in sting

rjh5000rjh5000 Member Posts: 22
edited November -1 in Working with GS (Mac)
Is it possible to use the display text to do something like this

You have game.lives left

so it then shows

You have 3 lives left

Thanks

Comments

  • DrGlickertDrGlickert Member Posts: 1,135
    Yes it is.

    Create an actor, Display Text behavior

    click the "e" to bring up the expression editor and then click on the button that has a downward arrow, click game, then click on the game.attribute you want to display.
  • DrGlickertDrGlickert Member Posts: 1,135
    Oh, I believe that the way to do that would be one of two ways;

    2 actors, one that says "You have lives left" Then a 2nd actor with the number (just like I stated above).

    Or, I think you can do it this way, "You..have"..game.lives.."lives..left."

    That 2nd one may not be totally correct, but I think it's right.
  • rjh5000rjh5000 Member Posts: 22
    DrGlickert said:
    Oh, I believe that the way to do that would be one of two ways;

    2 actors, one that says "You have lives left" Then a 2nd actor with the number (just like I stated above).

    Or, I think you can do it this way, "You..have"..game.lives.."lives..left."

    I'd been trying the 2nd way with (you have ) + game.lives

    I'll try your way. I knew there would be a way to do it

    That 2nd one may not be totally correct, but I think it's right.
  • rjh5000rjh5000 Member Posts: 22
    The second way does work, but it puts .. as the spaces, I thought that might have been the syntax for space

    Tried the first way too, sort of got it working but the second way looks much better except for the .. is there a way to get space in the string?

    Found this
    http://gamesalad.com/forums/topic.php?id=2861

    Will try this next
Sign In or Register to comment.