Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Sayhello-hello on Mon 27/09/2010 14:08:29

Title: How to make an achievement system?
Post by: Sayhello-hello on Mon 27/09/2010 14:08:29
Hi,

I haven't actually gotten any code down. But I was wondering how one would go about making an achievement system.
I thought about making some booleans and then set them to true once you've unlocked an achievement, but once you restart the game I suspect the achievement would be lost, and it's a game where you DO need to restart.

Or should I "manually" make the game restart, so that it just seems like it's restarting but in code, it's actually not?
Title: Re: How to make an achievement system?
Post by: tzachs on Mon 27/09/2010 15:51:25
If you play, and then restart your computer and play a new game, do you need your achievements to stay?

If you don't, then your way should work fine (with the "manual" restart).

If you do, then you should save your acheivements to a file, and load them manually each time you start a game. You can search the manual for file handling functions, or use a module, there are a few here that handle files...
Title: Re: How to make an achievement system?
Post by: Sayhello-hello on Mon 27/09/2010 18:04:50
I haven't actually thought about whether it should have an effect if you restart the computer, only the game. So thanks for pointing that out to me.
I guess the manual restart would be the best then, in case of new users or you just want to start all over, since it's a short game.