Load Attribute Troubles

Hi guys,

I'm having an incredibly frustrating problem with the Load Attribute function.

So, I have two levels. Each of them has their own Score attribute (game.Score and game.Level 2 Score), and their own High Score attribute (game.High Score and game.Level 2 High Score).

The score is compared against the high score Every 0 Seconds, and if it is greater than the current high score, the high score changes and is saved to another game attribute (game.Save High Score or game.Save Level 2 High Score).

Now, here's my problem. Whenever I use Load Attribute commands to load both of these attributes upon game start up ( 'from: game.Save High Score load: game.High Score', and then 'from: game.Save Level 2 High Score load: game.Level 2 High Score'), it doesn't work properly.

The two attributes copy each other. So game.High Score can be at 100, while game.Level 2 High Score is at 50, but after using a Load Attribute command to load them at the start of the game, they'll both change to 50.

I have spent hours and hours trying to find a solution to this, but figuring out that the copying occurs only when a Load Attribute command takes place is as far as I've been able to get. Can anyone please tell me what could be causing this to occur?

Thanks a ton in advance!

Comments

  • ChakkuChakku Member Posts: 1,513
    @CriticalGames

    Just put it into a Table and use the 'Save Table' behavior.


    That's just so much better.


    Chakku
  • CriticalGamesCriticalGames Member Posts: 45
    @Chakku

    Thanks for the quick response! I switched the system over to a Table and now it seems to be working fine. Thanks a lot for the help =)
  • ChakkuChakku Member Posts: 1,513
    @CriticalGames

    Haha!

    You're always welcome! :)


    Chakku
  • CORE GameCORE Game Member, PRO Posts: 280
    Tables are good indeed, but it should also work with save attribute, just make sure you didn't copy the previous save attribute (don't duplicate the attribute) instead drag a new one from the behaviors section.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Yes with table why anyone would still be using the load/ save behaviors is beyond me. Tables made those useless.
Sign In or Register to comment.