Save and load an attribute for achievement

Player_EPlayer_E Member, PRO Posts: 604
edited November -1 in Working with GS (Mac)
Okay I have an achievement for dying within the first 20 sec of the game and I cant seem to figure out how to only unlock the achievement once. This is what I have so far.

(simplified)

I have a global Boolean attribute that tells me if I have gotten the achievement or not.

Rule When global attribute achievement is false. when death before 20 sec spawn actor that shows achievement. Change attribute Achievements to true. Save attribute Achievement.

This is all on one actor.

Then when the game ends I have it so it resets the game so you go back to my main screen. on the main screen I have a load attribute achievement. which should load that the attribute is now true making the above rule not function.

Now I click play and die within 20 sec and the achievement still appears on my screen.

p.s. im doing this all on the GS preview button would that have something to do with it because im not actually using a devise to test it on at this point.

Any thoughts

Comments

  • Player_EPlayer_E Member, PRO Posts: 604
    Let me try and rephrase.

    First I have a global boolean attribute that is at false. That I want to determine if I have the achievement or not. I'll call this achievement 1 for description purposes

    I have an actor with the follow rule.

    When all conditions are valid
    Game time is less than 20 sec
    health is 0
    and game attribute achievement 1 is false.

    Spawn actor (the achievement image)
    Change game attribute achievement 1 to true
    Save game attribute achievement 1

    Now this should make it when I play the game again Game attribute achievement 1 is True therefore making the first Rule I have above invalid so it will not longer spawn the achievement image.

    When the game ends it goes back to my main screen and i have the load attribute achievement 1 on an actor in that screen. and when I click Play and die within the 20 sec the achievement image still spawns.

    hope that cleared things up.
  • Player_EPlayer_E Member, PRO Posts: 604
    My issue is this. i am going for an Xbox style of showing you got an achievement with an image on the screen that appears when you get it. my problem is that I cannot get that image to only appear once when you get it.

    it keep appearing game after game when I get the achievement when I only want it to show one time only in the lifetime of the game.
  • Player_EPlayer_E Member, PRO Posts: 604
    If im understanding you correctly. that is what my Rule currently is so it should not be spawning again. I'll keep messing with it to see if I can get something worked out.
  • iPhoneDevForMeiPhoneDevForMe Member Posts: 362
    From my experience, resetting in the Game Salad preview has always reset everything regardless of my save behaviors! Your logic seems sound, so I would try to preview it on an actualy device if you have that ability! It has always worked for me!
  • Player_EPlayer_E Member, PRO Posts: 604
    Hmm still not working even when I try it out on my device. I'll figure it out at least I know my logic is on the right path there is just a little bug somewhere I have to work out.
  • Player_EPlayer_E Member, PRO Posts: 604
    Not quite sure how to explain what I did, but it is working now :)
    thanks everyone
  • GingerBGamesGingerBGames Member Posts: 390
    Has anyone been able to create a working template of how these achievements work? I think this is something we can all use in games, achievement hunting is very, very popular.
  • GingerBGamesGingerBGames Member Posts: 390
    GingerBGames said:
    Has anyone been able to create a working template of how these achievements work? I think this is something we can all use in games, achievement hunting is very, very popular.

    What i'm looking to do is just what the Xbox does. This is, you don't see a picture in the dark square until you earn the achievement. Once obtained, an image is display in the dark square and never goes away. Perhaps even have it to where once the achievement is unlock you get certain points for the achievement and try to get all 100 points to complete 100% of the game.
Sign In or Register to comment.