Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Achievements [Harlowe 1.2.2, Twine 2]

edited September 2016 in Help! with 2.0
Hi!

In my story, I would like to implement Achievements.
I already have an idea how to do that: I am setting all conditions in the startup passage, for example, the character level is set to 0 and can go up while they play, then display something like this in the Achievements passage:
(if: $level > 1)[Made it past level 1!](else:)[This achievement is hidden.]

What I don't have in place yet, is a way for players to not to lose their achievements if they restart the game.

The only solution I can think of is the following:

1) have one startup passage that leads to the cover of the story
2) have variables specific for achievements in the startup passage (I know that the code above would need to be changed)
2) have a restart button that leads to a second "startup" passage that resets all other variables except for those related to achievements

This way, if a user starts the story for the very first time, they will go to the "real" startup passage, however, if they hit restart they go to a passage that resets everything except for the achievements related variables.

Do you know of a less crappy solution?
Would the workaround above work, or there is an obvious issue I am not considering?

Comments

  • Use a save-game function:
    {(link:"Save Game")[
      (if:(save-game:"Slot A"))[
        Game Saved!
      ](else: )[
       Couldn't save your game.
      ]
    ]}
    
    {(if: (saved-games:) contains "Slot A")[
      (link: "Load Game")[(load-game:"Slot A")]
    ]}
    
  • Deadshot wrote: »
    Use a save-game function:
    {(link:"Save Game")[
      (if:(save-game:"Slot A"))[
        Game Saved!
      ](else: )[
       Couldn't save your game.
      ]
    ]}
    
    {(if: (saved-games:) contains "Slot A")[
      (link: "Load Game")[(load-game:"Slot A")]
    ]}
    

    I already have a saved game function, but that simply brings back the whole progress.
    What I need is a way to let players start the story from scratch, but keep their achievements.
  • edited September 2016
    Apologies for the double post, this is to summon @Ceadda since the subject of achievements was mentioned in another thread.
Sign In or Register to comment.