Achievement Unlocked - do you like achievements?

@Cottage14, that line is just a note describing what you have to do in the game to gain that achievement. Where it is displayed, I am not sure of (I’m still finding my way with achievements myself) but I guess you can list these achievements (either as a pre-game option or a list in your stats page) and it would be used there. Again, I don’t know what command would call it up…

So this goes back to my basic question: are the achievements-related commands documented anywhere, or is this tribal knowledge?

@cottage14 It’s in a private doc that is sent to authors once they submit a game for publication.

2 Likes

Could that be said somewhere? What other extra instructions are available once a game is submitted for publication? Sounds like an incentive to finish and submit a game right there!

I’ve just figured out how to do achievements (a bit).

In startup, write this:

*create an_achievement 0

*achievement an_achievement visible 7 Title_Player_Sees
[indent once]This line appears in the “achievement screen”, after the Title_Player_Sees.
[indent once]This line appears in the popup box, under the Title_Player_Sees.

[You can also set it to “hidden” (instead of visible, and the achievement screen will tell you it exists and how many points it’s worth - you set any number of points where I’ve put “7” above. It will add them up for your player achievements are won). ]

Then in the right spot in the right scene, you put
*achieve an_achievement

I feel all kinds of knowledgeable now, THANK YOU for the example above (I’ve been searching for how to do this, coz I like a pop-up box telling me I’ve done something cool). I’d also love to know if there’s something official (somewhere super obvious I’m sure) I’ve missed.

It works fine with a Boolean *if
*achieve an_achievement

The achievement screen just magically appears near the “stats” button at the top of the player’s screen.

1 Like

I’m finding the system I outlined above a bit glitchy when I don’t play the game in order :frowning:

It comes up with an error saying “already defined line 87”. . . but line 87 is about something completely different.

I can get around it by cutting the whole piece of code, playing the scene I’m working on, then bringing it back.

@Felicity_Banks I followed your instructions above, adding a single achievement to my game as a test. When I run the game and do what is needed, the popup appears to tell me I have gained the achievement.

However, I don’t see how to display achievements gained on the stats screen or elsewhere. I am testing in Firefox on a laptop, and maybe what you described (“The achievement screen just magically appears near the “stats” button at the top of the player’s screen”) is behavior on a mobile device?

In the current version of choicescript creating an achievement like so

*achievement toothandclaw visible 10 Clipped your claws
  Complete the case "By Tooth and Claw"
  You completed "By Tooth and Claw"

Should add the achievements button right next to the stats button. Also there is no need to *create the achievement that is done via *achievement itself likewise only *achieve toothandclaw in my example to set it off.

Doesn’t seem to add a button. Do I need to have multiple achievements or something?

I just downloaded the latest version of ChoiceScript and ran the game using that. Still no improvement.

Try adding a second achievement see if that works

For what it’s worth, I downloaded the new ChoiceScript today and it immediately showed the Achievements tab.

Hmm. I’m also working with firefox on a laptop (using notepad++), so it’s not that.

I cut out the unnecessary ‘create’ command (thanks Nocturnal_Stillness), and the glitch seems to be gone (I swear I tried that before, though - perhaps this is a “turn it off and on again” problem).

Multiple achievements definitely aren’t necessary for the ‘achievement’ button to appear. It just suddenly exists in the game beside ‘show stats’ and ‘restart’.

I will now reveal the extent of my technical expertise:
Check for missed indents or typos.

…and that’s it.