Saving attribute not working between sessions. Anyone can help?
dieseljesus
Member Posts: 50
Hiya! Working on our first game and we would like to save the highscores. What i do is save the highscore with key "HighScore1", i also load it as "HighScore1". This is done after checking that the gamescore is higher than the highest Highscore. If it is, it saves it.
I get it working perfectly inside the game. If someone sets a record, its saved, and the next time you check the list, its at the top.
The problem however is that if i quit the game, and start it again. None of the scores are saved. If the case is that it cant be saved permanently, the idea of the game is lost. The object of the game is to beat highscores, and if it cant be saved, whats the point of keep developing it!
Any ideas is appreciated!
I get it working perfectly inside the game. If someone sets a record, its saved, and the next time you check the list, its at the top.
The problem however is that if i quit the game, and start it again. None of the scores are saved. If the case is that it cant be saved permanently, the idea of the game is lost. The object of the game is to beat highscores, and if it cant be saved, whats the point of keep developing it!
Any ideas is appreciated!
Comments
I've never used particle, but there is info on how to fade in and out in the Support section.
_______________
Tickle Stones http://itunes.apple.com/us/app/tickle-stones/id363484260?mt=8
Food Fight! (free) http://itunes.apple.com/us/app/food-fight/id352646643?mt=8
Im using the same load key as the save key. Exactly the same.
Are you doing a save only if the new high score is > the saved high score?
The Load attribute im using at the splash screen in the beginning of the game
On my main menu, it shows you your high score, its convenient because you don't have to open anything and its there right when you open it.
So to show my main menu high score it says: display text (game.highscore) then it says load attribute: (key: highscore load attribute game.highscore)
Then when you die, you change scenes and it takes you to an options menu that displays the score you just got: display text: game.highscore, rule when game.score > game.highscore
change attribute game.highscore to game.score, (in same rule, save attribute: game.highscore, key: highscore)
This is what worked for me, Good Luck!
___________________________________________________________
(JetPacked!) http://itunes.apple.com/us/app/jetpacked/id361063574?mt=8
___________________________________________________________
(JetPacked! HD) http://itunes.apple.com/us/app/jetpacked-hd/id365205067?mt=8
"Also, another question that i forgot to ask. Can i get the particles to fade? Im doing a particle explosion, and im trying to do a "color changes to" and set the "to" value to a 0% alpha value in the drop box. Its not working tho. The particles just dies, and that looks pretty strange! Any ideas how to get this working?"
Use the interpolate behavior, trust me it works great, just put it in my update:)
___________________________________________________________
(JetPacked!) http://itunes.apple.com/us/app/jetpacked/id361063574?mt=8
___________________________________________________________
(JetPacked! HD) http://itunes.apple.com/us/app/jetpacked-hd/id365205067?mt=8
Chosenstudios: Hey, also tried the interpolate function. Got the actual actor to fade (Showed an image) but the particles did not fade. Its like the particles are enteties/actors of its own that does not fade.
"Codemonkey: Its for an iphone game. I got it working in the actual game now in a few of the scenes, but not in one scene. The strange thing is that the scenes are exactly the same, the only difference is the difficulty + the background. Apart from that, its the same actors!"
are the particles set to the image your interpolating? because that should do it:)
___________________________________________________________
(JetPacked!) http://itunes.apple.com/us/app/jetpacked/id361063574?mt=8
___________________________________________________________
(JetPacked! HD) http://itunes.apple.com/us/app/jetpacked-hd/id365205067?mt=8
About the particles. I got the image to fade but not the particles.... Must be something i forgot, but about the score... it was all the same scene basically, and just saving to one higscore for testing purposes... it seems there is some bugs with this... thats not strange tho since its a beta! It works pretty good tho
How can i check when a game-flag is increased and then do something?
I want to do something like this:
When Game.Flag = Game.Flag+1 then do X.
Im working on a chain function, and to get it working properly, i need to see when the my actor counter is increased. Anyway to get that working?
your saying: game.flag = 0
then for whatever reason do game.flag+1
then check for when game.flag = 1 then do this?
is this what your saying?
___________________________________________________________
(JetPacked!) http://itunes.apple.com/us/app/jetpacked/id361063574?mt=8
___________________________________________________________
(JetPacked! HD) http://itunes.apple.com/us/app/jetpacked-hd/id365205067?mt=8
When Attribute KillCount = KillCount+10.
At the momet i have a timer that constantly is counting from 5 to 1 and then from 5 to 1 again.. looping. If i score 3 kills within that time, i get a bonus. The problem however is that sometimes you do get 2 kills when its only 2 second left, or you get 3*2 (6 kills = 2 chainbonuses) within that time.... its not optimal, and i would love to be able to do a flag when something is increased.
Another thing. Our game is really fun. We cant stop playing it. The mechanic is 3 different colored buttons at the bottom of the screen. From the top, orbs come falling down. Starting slow, and speeding up. You have to press the right button first, and then tap that color orb. After a while its like a dance game or guitar hero game where you cant stop playing, trying to beat the high score. The problem however is that i CANT get some stuff to work. Right now its the triggering of sound effects. Sometimes they are not playing at all... and sometimes some of them play. A few minutes ago, the simplest 500 byte sample that was on the buttons stopped working for no reason. Stuff that worked before stopped working now, and all of a sudden my save score started working.
and then sometimes whatever i add to the actor slows it down sooo much. What we need is a super quick game where you NEVER miss a touch on the screen.
Right now its feeling a bit sluggish when you get to the higher levels. i have between 4-7 actors on screen depending on level. They are non animated, dont have any effects, no sounds and nothing. The only rules i have on the actors are counters and hit rules. 1 rule saying that the actor will be killed if it collides with the player, and 1 rule that says that it should die when you touch it. Apart from that its score counting, actor counting and destroy behaviours. Not too much complicated stuff going on there, but still feels a bit sluggish and jagged a bit in the game. Is this because of the engine being slow? Im doing 2 games in unity and there i have a 2d game going on with 20-30 actors workin at the same time without slowing the system down.
Any ideas? I would appreciate if someone maybe could take a look at this and see what might be a problem. I would love to be able to have working sound effects on the orbs etc. Please help me out here!
When KillCount = KillCount+1 (or whatever!) play sound.
See what im after? I want to trigger something when something else is increased or decreased.
If i get 5500, it shows the score as 5450.....
is it me or is this software jinxed or something?!
Ok heres what you can do: after you kill the first actor make it flip a switch, when attribute blankedy blankedy = whatever, than for 5s if chain attribute = whatever than do this, (give you extra points or whatever)
hey sorry about this, I have to go, I'll try and come back soon and see if you've got this worked out and if you don't I'll help you, sorry about that, ugh almost had it done, sorry g2g! Good Luck!
___________________________________________________________
(JetPacked!) http://itunes.apple.com/us/app/jetpacked/id361063574?mt=8
___________________________________________________________
(JetPacked! HD) http://itunes.apple.com/us/app/jetpacked-hd/id365205067?mt=8
Whats the matter with this? I know the scripting is right, and i got it working for a day or so, but then without any change, and by just resyncing it got it working again. Is this a program bug or what is it?
He might still be testing with the old one.
Perhaps you should make a version number visible in the app.
1. Delete it from phone via itunes by unchecking the app there.
2. delete it from programs in itunes list.
3. Drop the new appversion into itunes
4. sync.
Its clearly visible what version it is and we all see the latest version number.
I tried another thing now. I had an actor called ScoreCounter in the different levels, and i edited them as an instance. Now i did 3 different actors instead. What do you think of that? I hope it helps.. the strange thing is that its working for a while, then its not and then it is for a while. It doesnt feel stable.
Btw. thank you alot for all help!