Question about Attributes

GuaveMediaGuaveMedia Member, PRO Posts: 1,262
edited February 2012 in Working with GS (Mac)
Hey,

I have just a quick question. When I have an attribute set (normal) to let's say, 1000.
And in game, this attribute changes, and I set up correct loading and saving rules,
when I come back it will be set back again to 1000 or?

I just had the issue that I tested a shop, I set the shop coins to 2000. And each time I came back in the game
it was still at 2000, even if I bought something. I was going crazy, I couldn't find any wrong rule...And now it hit me..

Thanks for support,

Alex

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Well If you save it at 2000, then you buy something and come back. It will load at 2000 because that was the last you saved it as. Everytime the attribute changes you need to save it
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    The problem is, in my last level, I have a rule saying:

    when level finished is true
    change money to money + 200
    save attribute game.money, key: money

    In my game start scene (menu) I have a load attribute
    Key: money, game.money attribute

    Is it because I am using an index instead of an integer?

    Alex
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    ehm I guess no but I am not sure... :/
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Hey,
    okey I replaced it and will check again. I am using an AdHoc, I know that the Viewer doesn't work
    for this.
    Alex
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    I re-set the rules and it works now :)

    thank you
Sign In or Register to comment.