Saving multiple attributes

alvinsiahalvinsiah Member Posts: 4
edited February 2012 in Working with GS (Mac)
Currently I'm facing a huge problem of saving multiple attributes values to different keys. Example my game keep track of score for each individual stage as below:
save
attribute:stage 1-1 score =>100 save to key: s11
attribute:stage 1-2 score =>200 save to key: s12
however, when i try to load the key accordingly
load
key:s11 to attribute:stage 1-1
key:s12 to attribute:stage 1-2
the last score 200 will overwrite all the save score command before it. Ended up the score 100 in stage 1-1 becoming 200 instead.

Is save attribute only capable to save a single value?

Please advise... :(

Thanks in advance.

Comments

  • POMPOM Member Posts: 2,599
    edited February 2012
    "Is save attribute only capable to save a single value?"

    Sure , but you can overwrite it every time you want , you say that when you load " key:s12 to attribute:stage 1-2" it overwrites your "stage 1-1 score" ?
    If so , something is wrong with your save/load rules.. you need to check it..

    Roy.
  • alvinsiahalvinsiah Member Posts: 4
    Thanks for the quick reply. Let's say I wish to save both different values respectively to s11 & s12 in the same scene. Is it possible? Bcos currently I observe only one value of the attribute is saved when I load them in different scene.
  • POMPOM Member Posts: 2,599
    Sure you can , i have a scene where i save 50 different attributes , one by one , shouldn't be a problem ..
    Also i have a scene that has an actor that loads about 200 different attributes , also without a problem , just check that you make different keys for every attribute , and that you load them with the same keys you saved them .

    Roy.
  • alvinsiahalvinsiah Member Posts: 4
    Thanks Roy for the information. ^^

    after i knew from you that is it technically possible i try to debug my rules from a different angle. I finally found out the problem with my rules. turn out that i need to drag a new save attribute from the behavior list in the same scene to avoid the issue above.

    Previously i copy and paste "save attribute" behavior and some how the value saved is the same across all different keys. is really weird. although i double check all respective attributes save to different keys name, yet the problem persist! grrrr... ><

  • POMPOM Member Posts: 2,599
    edited February 2012
    So have you sorted it out with your new finding? or do you still have a problem?

    Roy.
  • alvinsiahalvinsiah Member Posts: 4
    No worries. is solved :)
Sign In or Register to comment.