Achievements
blue_elephant
Member Posts: 505
I want to create achievements like in tiny wings or jet pack joyride. I can think of many ways to do this but wanted to hear your experiences and what is the most efficient way.
Thanks
Thanks
Comments
★ My Apps | Gamesalad Tutorials : Youtube Channel , Website. ★
* Activate the achievement while you're playing
* Activate the achievement after you've played.
And you have the percentage achievements that run over several games but they still fall into either of those two above
★ My Apps | Gamesalad Tutorials : Youtube Channel , Website. ★
The achievement is 'run over 1000 metres' (this is just an example).
Make a boolean variable called Achievement_Unlocked
Make another boolean variable called AC_1000m (or whatever you like - I tend to use AC to stand for achievement).
These are both set to 0.
In your control actor (or wherever really, but I like to keep it in control) have the rule:
If AC_1000m is false AND distance >1000m
change attribute AC_1000m to true.
SAVE AC_1000m
change attribute Achievement_Unlocked to true
Timer: After x seconds change attribute Achievement_Unlocked to false (x is just however long you want the message to appear for).
On the game screen somewhere, have another actor that will display 'achievement unlocked' with a graphic maybe.
I call this the AC_Display actor. Make its opacity = 0.
In this actor have a rule that says:
If attribute Achievement_Unlocked is true
Change attribute self.opacity to 1.
Otherwise change atrribute self.opacity to 0
Now, when you get over 1000m, the following happens:
The control actor checks to see if the variable AC_1000m is false (which means you haven't got it yet).
If you HAVE got it, it will be ignored. If you haven't, it'll change the value to 'true' so that it's ignored next time.
It SAVES the value so that when you LOAD it back in at the start, it remembers if it's true or not.
The attribute Achievement_Unlocked is changed to true, then turned back to false after X seconds.
In the AC_Display actor, when the Achievement_Unlocked variable is changed to true it will make the graphic visible. After X seconds, it will make the graphic disappear.
You don't seem to have a Pro version of GS yet, so this will help make your own in-game achievements with any luck.
The logic should also help you when you get pro too, so hopefully you're good after this! I'm sure there are probably more efficient methods though that others will share with you!
Ta!
QS =
D
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
If Table cell value is true
--Unlock Achievement
Thats just a crude example but the option should be coming down the pipe in the relatively near future so depending on how long you plan to be in development you can possibly bank on it being there when your ready. though I would suggest you not build a game with the plan of needing a future feature.
Cheers
Aaron
Do you guys know of any GS made games that have an acheivment system so I could see a little of what's out there?
★ My Apps | Gamesalad Tutorials : Youtube Channel , Website. ★