drop down banner for achievement
Hi guys? I am struggling to find a way to ddisplay a achievement banner in my game saying i have achieved this. I am using attributes for achievements cuz i am not pro yet so i cant use game centre. Help!
Comments
1.Create a global binary attribute called achievement_just_unlocked.
2. Create a new actor called achievement_rules. In this actor create new self attributes for each of your achievements. Create a table with each of your achievements on a row, with a bolean value. Constrain each of the self attributes to the relevant table value. They should all be false by default.
3. Create a rule in this actor to check if 1. the self attribute is false and 2. the achievement value has been beaten, then change the attribute to true, change the table value to true, save table value, change achievement_just_unlocked to true.
I don't have the files on this laptop to take a screen grab, but your rule should look like this:
When all conditions are valid
self.3_coins is false
game.number_of_coins is equal to or great than 3
change self.3_coins to true
change table value
save table value
change achievement_just_unlocked to true
4. Create an actor called show_achievement_unlocked. In this actor create a rule that if achievement_just_unlocked is true, interpolate x and y onto the scene. After 2 seconds, interpolate x and y off of screen and change achievement_just_locked to false
What all of that does is:
Checks to see if the achievement has been unlocked, if it has, then display the show_achievement_unlocked actor for two seconds before moving it off screen and resetting.