Save time

halloweenie

  • Posts: 18
hey all, fairly new to stencyl here but finding it really easy to pick up, well except for this one thing....

first off, a bit of details on the game.
the game is just a simple "how long can you last" type game, there is a timer up the top telling you how long you have gone for so far.

how do i get that time to save when you die?
id like the death scene to read:
You got:
Your best time:

is that even possible?

oh and also how would i go about submitting that score to a custom website (not kongregate,mochi ect.)

THANKS IN ADVANCE PEOPLE

kynbo

  • Posts: 139
It's very possible by using a game attribute.
"Game Attributes are changeable values that are stored along with a game and, thanks to saving and loading, can persist between gameplay sessions."
(More on game attribute: http://www.stencyl.com/help/view/game-attributes/)

- Make a game attribute (Settings > Attributes)

- Every time your actor "dies", set your game attribute to your best time (check if your recent time if greater than your game attribute time)

- After setting it to your best time, find the saving block "saving game and then..." block  in the Game tab and put it underneath.

- Your best score is saved but now you have to load your save every time you open the game right? To load your save, put the "load save file and then..." when your first scene is created.

Before asking questions please check the Stencylpedia :)
http://www.stencyl.com/help/toc/

halloweenie

  • Posts: 18
wow thank you for the fast response, is there any video tutorial around? i find it better to learn that way. :)

kynbo

  • Posts: 139
I followed Abigayl's tutorial when I first started but they are not videos however.
Sunrisekingdom's Tutorials are videos but they were too slow for me. Abigayl's tutorials are recommended by me if you want to learn the basics fast.
Note that both of those tutorials were created with Stencyl 2.0 so there might be some insignificant differences.
There are also more here: http://www.stencyl.com/help/tv/

halloweenie

  • Posts: 18
ok cool thank you. would you have any idea on how i would submit the score to a website thats not newgrounds, kongregate ect.

halloweenie

  • Posts: 18
ok i finally figured out how to do it, but im getting a problem. when you click try again on the death screen the score doesnt reset, it just keeps going from where you died. any suggestions?