adding a special money system to my game to unlock potential characters
I'm having a bit of trouble... I'm trying to add a attribute that will allow my characters to get the items in the game in order to buy certain characters... i guess the best example that i can give is the jet pack joyride where you are able to collect coins in the game in order to buy in the shop... i have something like this already
i have an attribute labeled coins and each time the character overlaps or collides it would change the attribute game.coins to game.coins+1 and i have a save attribute before the character dies
the problem that I'm having is that when it goes to the beginning scene... (the scene where it displays how much coins you have made) it only shows the coins that you have made the last time you played and its not adding everything up everything so the character will not be able to make the coins that the character needs to
kinda frustrating but i believe that all the rules that i have set up are correct so can someone please let me know what I'm doing wrong.
i have an attribute labeled coins and each time the character overlaps or collides it would change the attribute game.coins to game.coins+1 and i have a save attribute before the character dies
the problem that I'm having is that when it goes to the beginning scene... (the scene where it displays how much coins you have made) it only shows the coins that you have made the last time you played and its not adding everything up everything so the character will not be able to make the coins that the character needs to

Answers
I'm sorry, but I can't make much sense of the three, run-on sentences you have in that paragraph.
this is what is happening... the coins are saving but the coins that you have collected are not adding... it just always adds up the last time you have got any coins.
like i said the best example that i can give is jetpack joyride... how you are able to collect the coins and then buy items in the shop... essentially I'm trying to do just that!
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
okay lets just say that i keep on tapping to gain coins up to 30
the next time i keep tapping and i gain 5 coins
what i would like to do is for the score to be 35 coins not my last score of coins which would be 5... does that make sense... i feel like i did justice with this explanation lol
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
lets say that i have made 30 coins the first run... and after that i loose...
the next game lets say that i make 20 coins... and then after that i loose
it will display the last coins that i have made which would be 20... rather than the total amount that i have made throughout the whole process of me downloading the game which should be 50...
i guess i need to call on @MotherHoose to help me out with this
the save/load attributes you have in your game may be working when actual game is on device
(Preview is a developmentTool … when we exit Preview … things are reset to the development values … the state of the game with our original programmed values)
GS Viewer is a testing tool … try your save/load code there
… or publish a Macintosh build … and test that build on your desktop
==
to decrease the load on your playerActor … have the coinActors add to the score
and does each saved attribute have just one load? … at the start of the game?
check those behaviors again …
add displayText for each (sceneCoins; totalCoins) … to verify they are adding
@digitalzero … are we at the point … where you send us your projectFile?
so this is what i have placed
in the beginning of the game i have the load attribute for the game.catcoins
before the end of the scene where the actor that triggers the "you lose" screen i have placed a save attribute...
when you go to the "you lose" screen if you tap it i have a rule placed that if its tapped then it will reset the game...
and of course when the game is reset it goes back to the title screen which has the load attribute game.catcoins
is there something wrong where those are placed? because i do not mind throughout the game having it saved and not reset back to zero... i just wanna assure that the game is able to constantly updating the cat coins because its very imperative that the player is able to collect those because i have unlockable characters. i read the youtube tutorial with @TshirtBooth in it about the save and load attribute as well as the how to save a high score (which worked out perfectly by the way) but i just need to have the score that you added to the total cat coins without resetting all the time
but … maybe try a saveBehavior just before the resetBehaviors in the "you lose" screen