Unlocking achievement under more than 1 condition

chongyunxiang

  • *
  • Posts: 278
Hi,

I'm able to unlock an achievement under 1 condition, but when it's 2 or more, it doesn't work properly.
In fact, what I've done is actually workable, but it doesn't save the achievement being unlocked.

The scenario is:
When player unlocks the achievement in 1st attempt and immediately restarts the game after gameover instead of going back to Home, and player fails to meet the achievement in the 2nd attempt, the achievement will remain unlocked.

This doesn't happen to my 1 condition achievement. It saves the unlocked achievement as long as the criteria has been met once.
I can't find any tutorials or threads that is similar to mine in terms of it not saving after meeting criteria once.
What's wrong and how do I get my 2 or more conditions to work?

Thanks!

MichaelPel

  • *
  • Posts: 458
Have you tried using booleans?
If achievement achieved is false, give achievement and set achieved achievement to true

Also, set part1 of achievement to true when something happens

If achievement part 1, 2 and 3 = true then reward achievement

chongyunxiang

  • *
  • Posts: 278
Hi,

I'm able to unlock the achievement when I meet the criteria. But if I were to restart the game immediately instead of going back to the Home screen,  and failed the meet the criteria this time, then it won't register as unlock.

This doesn't happen when I set to only 1 condition.

I'll give your suggestion a try! Let you know the results soon!

letmethink

  • *
  • Posts: 2545
How are you restarting the game? What are you running this on?
~Letmethink

chongyunxiang

  • *
  • Posts: 278
Hi,

I've created a restart button that brings players back to the game scene and it'll create the last selected character. I've attached a screenshot of it. The previous screenshots showed how I did the unlocking of achievements. Can I ask, what do you mean by running this on? I'm planning to release it on mobile and have tried on both Flash Player and Android.

Thanks!

chongyunxiang

  • *
  • Posts: 278
[UPDATE] I have tried using booleans and its still the same results. Is there a more efficient way to do this?