inconclusive Cookbook videos

GaranasGaranas Member Posts: 86
edited November -1 in Working with GS (Mac)
Why are the Cookbook videos so inconclusive?

Like this one:


"that´s pretty much all you need to know" - uh... not really. a lot is missing

1)
While the video is named "Loading and Saving Attribute in GameSalad" the one thing it does not show is the loading of the attribute - shouldn´t that be in a video with this title?

2) The question to why it is not shown in the video is "i can´t show it here but it will work on the actual devise" - why is that? Does "load attribute" not work in the preview mode? So if i have a game that depends on loading attributes like a subRPG i can not test it in the preview mode? How about the webpreview - my browser is the actual device, shouldn´t it work there?

3)
It seems It does not work - the score is not "saved" as in "it is save" - (in the web preview) reset the score and your saved score is also gone. So you would actually need to have a second score that is saved, so when the first gets reset. the second is still there. but that second score is also reset once you restart the game. So is it saved or not? and where?

So what now? If i can´t preview a attribute based game because load does not work in previews, how is it possible to test the game? How would i testplay the upgrades i add in a upgrade shop if the attributes can´t be loaded in the next scene in the preview?

I´m really puzzled - that´s far away from "pretty much all you need to know"...

Comments

  • entersimonentersimon Member, PRO Posts: 273
    For saving and loading attributes all you need to know is that the "key" needs to be exactly the same for the save and the load.

    So if you're saving a score attribute it would look like this:

    Save Attribute game.score1 key score1

    Then somewhere else in your game, put the load attribute behavior in so that it loads as your game loads. It'll look like this:

    Load Attribute key score1 attribute game.score1

    You can actually test the load by using the reset button in the preview. It acts as if you pressed the home button and reopened the game. If you go back in creator and then press preview again, no attributes will load because it's a totally new build.

    Best of luck!

    :^)
  • GaranasGaranas Member Posts: 86
    @entersimon

    i have done that - as it´s said in the video. it does load the score - but it seems not to save the score. so i save the score to a key, but when i reset the score it also seems to reset the score saved in the key. also when i restart the game, the score is also back to zero.

    have a look at this test i build:
    http://gamesalad.com/g/39821

    it does exactly what is said in the video. if you hit the +10 it adds +10 and saves. if you hit reset it resets game.score to 0 but does not save - so when i load it should load the last saved number - but it does not.
    Also when you reload the game in your browser it also resets the score to 0

    i made this downloadable - maybe you want to have a look at it and tell me if something is wrong

    thx so far :D
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Load and saving can only be tested in the viewer or adhoc build. Not in preview mode.
  • Rob2Rob2 Member Posts: 2,402
    image
  • GaranasGaranas Member Posts: 86
    @tshirtbooth

    so why doesn´t it work here?
    http://gamesalad.com/g/39821

    it saves the score to the key "test". if you click reset it resets the score but should not reset saved value in the key "test". but as you can see if you click test, the value is zero.

    why? any why is it not saved when i reload the browser window?

    @Rob2
    thx, i know that button ;)
  • GaranasGaranas Member Posts: 86
    @tshirtbooth

    i did, just as the video says
    http://imageshack.us/photo/my-images/13/screenshot20110908at332.png/

    i put the "game save test" file for download in the GS Creator, so you can have a look at it. As far as i can see i have done all the video says. still if i reset the score it also resets the save under the key
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Rob2 said:
    image

    @Jonmulcahy This little reset button is how you test saving and loading in preview
  • GaranasGaranas Member Posts: 86
    @tshirtbooth

    thx for testing :)

    so where do i go from here? this problem really drives me nuts at the moment. It´s also very bad that this can´t be tested in GS Creator. I would need a 99$ apple account just to be able to test loading attributes.

    Is there a work around? It seems to work in your Zombie drop html version - even on reload of the browser window :)
  • Rob2Rob2 Member Posts: 2,402
    I'd say it is an issue with attributes and GSs flaky management. If you save from one attribute and load to another (so don't use the same for save and load) it works fine, HTML and OSX preview.
  • Rob2Rob2 Member Posts: 2,402
    I rebuilt your project from scratch and it all works fine. These kind of random errors that can creep into even the smallest project and not show themselves are why GS is still a million miles away from V1.

    I will upload.

    http://bit.ly/pvKgSm
  • GaranasGaranas Member Posts: 86
    @Rob2

    wow, thx a lot! i updated my version with your version to see how it works online - hope that is ok!

    Yes, GS really has a lot of bugs. i also often have to redo things because they stop to work, without anything changed. build again - bam, works.

    thx again. you saved my life :D
Sign In or Register to comment.