I'm doing the BobblePop tutorial in LevelZero and I'm having a problem with Set Text actions.
I'm supposed to create two actions, one for Score and one for Lives. So I do the one for
Score and the action reads Set text to "Score:" &Score, and it works when I run the game.
Then when I try to set up the Set Text action for Lives, I get to the box for Parameters for
Lives: Set text. I put in "Lives:" &Lives. The Objects with Expressions box starts flashing,
and on the Parameters box I get the message, 'Lives needs an expression after it. Lives is
an expression name and you need a dot and an expression name after it.' What's my problem
Did you name your text object "lives"?
I'm assuming "lives" should be a variable, or that you haven't set up the "lives" variable yet.
There is indeed an object named 'Lives'.
Develop games in your browser. Powerful, performant & highly capable.
You can have a variable and object named the same. If you reference the object, it will ask for a "." and parameters in the expression. If you reference the variable, it can stand as is. When typing in "lives", make sure you pick the one that is the variable.
Edit: As a best practice - never name two things the same thing. So use LivesText, or LivesVariable instead if necessary for example.
Ha ! oosyrag now that is clear, where was you when i did exactly that thing ?
Thanks oosyrag, I had NOT set up a "Lives" variable and that did the trick.