0
\$\begingroup\$

For example the achievement is "Pass 5 levels in a row without failing"

It's incremental and has five steps.

If a user hits an obstacle, this achievements score should obviously be resetted to 0.

How to to this? I found no such method or anything in the internet.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

You don’t. This would need to be simply a single-step achievement.

\$\endgroup\$
3
  • \$\begingroup\$ So it's not even possible? \$\endgroup\$
    – Squareoot
    Commented Jan 17, 2020 at 12:06
  • 1
    \$\begingroup\$ @Squareoot it's possible, but tracking the increments of "3/5 levels passed without failing" happens in your game code, not in Google's back-end. Since that variable lives in your code (or on your server if you need to persist it between game sessions, depending on how strictly you define "in a row"), you can reset it to zero anytime you want. Once the variable hits 5, only then do you report to Google "This single-step achievement is complete!" \$\endgroup\$
    – DMGregory
    Commented Jan 17, 2020 at 12:52
  • \$\begingroup\$ @DMGregory thanks I understand. \$\endgroup\$
    – Squareoot
    Commented Jan 17, 2020 at 17:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .