TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Saving High Score Problem
Pages:
1
Saving High Score Problem
Genadiy
Posts: 12
February 26, 2014, 04:44:04 pm
I will keep this short and simple I have a timer that goes up every second and when my character dies I want to save the high score to the next scene. I wrote a code to do that but its not saving! hears my code what could be wrong?
Photon
Posts: 2691
February 26, 2014, 06:01:01 pm
You have to save High Score to a game attribute for it to persist between scenes. Right now in the load, you are just setting high score to itself. Check this out:
http://www.stencyl.com/help/view/saving-and-loading-games/
http://www.stencyl.com/help/viewArticle/158/
http://photongamedev.wordpress.com/
Do
NOT
PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!
Genadiy
Posts: 12
February 26, 2014, 06:55:02 pm
Hmm I forgot about making a game attribute, I remember making a code similar to this one for 2.0 and it worked fine, after upgrading to 3.0 I can't seem to figure it out, so I did what you had told me and I'm still having the same problem, hears what I got
Photon
Posts: 2691
February 26, 2014, 07:27:21 pm
What does happen then?
http://photongamedev.wordpress.com/
Do
NOT
PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!
Genadiy
Posts: 12
February 26, 2014, 07:34:58 pm
The time isn't saving as a high score , it just stays 0. Let me clear things up so basically the time saves as a high score but if the time gets above the original time I want the new time to save as the new high score
Photon
Posts: 2691
February 26, 2014, 07:48:03 pm
Look at your "Do Every." Your increment block says to increment "number," not your timer attribute.
http://photongamedev.wordpress.com/
Do
NOT
PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!
Genadiy
Posts: 12
February 26, 2014, 08:00:55 pm
Okay I changed it to timer but I can't place a timer block in place, I'm still having the same problem
Photon
Posts: 2691
February 26, 2014, 08:02:45 pm
Quote from: Genadiy on February 26, 2014, 08:00:55 pm
Okay I changed it to timer but I can't place a timer block in place
What do you mean? You can't put the timer attribute getter into the increment block? You should be able to select it from the increment block's dropdown instead of moving another block into it.
Also, shouldn't you now also be comparing timer against the game attribute for saving a new high score?
http://photongamedev.wordpress.com/
Do
NOT
PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!
Genadiy
Posts: 12
February 26, 2014, 08:14:30 pm
Yes I did selected the timer in the drop down list and what do you mean by "comparing timer against the game attribute"?
Pages:
1