Achievements: what's the best way?
debugdesign
Member Posts: 886
I have got to grips with the attributes 'integer' and 'real' and kind of understand 'boolean' (true or false) but i was wondering how best to use attributes in getting achievements.
For example, I have a top down shooter and if I wanted a 'tank killer' achievement I guess I would create an attribute called tank-killer and make it an integer. If the player destroys a tank it's +1 and at the end. If the player has <10 then spawn actor 'tank killer' on the end screen.
If I have to do this for 10+ achievements then it could start to get code heavy.
Has anyone found a streamlined way if doing this action as I am very aware of file size now after I couldn't submit a competition entry due to being over 10mb.
Thanks
p.s game salad is great but it's so unstable I have to save every 5 mins and reboot it every 2 hrs
my ideal improvement would be a drop down next to 'home' and 'scene' called 'actors' so I can jump to any actor with one click instead of two.
For example, I have a top down shooter and if I wanted a 'tank killer' achievement I guess I would create an attribute called tank-killer and make it an integer. If the player destroys a tank it's +1 and at the end. If the player has <10 then spawn actor 'tank killer' on the end screen.
If I have to do this for 10+ achievements then it could start to get code heavy.
Has anyone found a streamlined way if doing this action as I am very aware of file size now after I couldn't submit a competition entry due to being over 10mb.
Thanks
p.s game salad is great but it's so unstable I have to save every 5 mins and reboot it every 2 hrs
my ideal improvement would be a drop down next to 'home' and 'scene' called 'actors' so I can jump to any actor with one click instead of two.
Comments
Then you would have another attribute set (where it seemed proper to place them but likely game level again) that would be your counters for how many of what or whatnot have occured during the current play (this correlates to your "tank-killer" attribute you mention). Whatever triggers an achievement action (i.e. an enemy kill, a long jump, a sequence of events, etc.) would increment or update those attributes as you state and these would likely be done either at the actor level for simple counts (i.e. a tank actor increasing the tank kill counter before destroying itself) or likely a game level attribute for the other types of achievements I previously mentioned since they may involve multiple actors/actions.
Some of this is a repeat of what you state but I just put forth another person's take for newbies reading the thread.
Similar mechanisms would be employed for 1UPs/unlocks with an additional boolean (or counter depending on if they are stackable) attribute to denote the 1UP in action or available to use.