the trouble I am having is coming up with the attribute game.score - I initially created the actor for score and pulled it onto upper left corner of scene. Then under rules for "score" I click display text. Under attributes, the first column has both game and score. How do I fix this.
Next, When I click +Timer, I am unable to type attribute in the behavior area. Any thoughts? Thanks for the help.
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
There are three types of attributes in GameSalad: game, scene, and actor (aka self) attributes. The reasoning you are seeing "score" in the attributes menu is because that is the name of the actor. If you changed the name of the actor to "Bob," you would see:
game Devices Bob
(Devices attributes are also game attributes, by the way. Scene attributes only appear when an actor is unlocked.)
To create a game attribute, you have to look in the attribute browser and click the '+' button. On a Mac, that looks like this:
I found that, and added the attribute score as a text. Is that what I should have done? Sorry for the questions, I am absolutely new at this.
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
Text attributes are for... text (words). For a score, you usually want an integer attribute. You cannot change an attribute's type so you'll need to delete it and create it again.
ok, thank you for the help so far. I have the text display working but do not understand why I still cannot get the timer to work. I have it where it says every 5 seconds but cannot do anything else below it for the game.score +100 part
Comments
Change attribute game.score to game.score + 100
Like that?
Next, When I click +Timer, I am unable to type attribute in the behavior area. Any thoughts? Thanks for the help.
game
Devices
Bob
(Devices attributes are also game attributes, by the way. Scene attributes only appear when an actor is unlocked.)
To create a game attribute, you have to look in the attribute browser and click the '+' button. On a Mac, that looks like this:
Actually . . . as a bit of code, this is much better:
Timer every 5 seconds
Change attribute game.score to game.score + 117
With my version you get 17 more points every 5 seconds.