Howdy, Stranger!

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

Locking/hiding link(s) until the game has been completed twice

So I have a particular idea where you can get to play through the interactive fiction as either one of the two characters given, and I want to throw in a third one that is locked/hidden until the player has played through both characters. Is there any ways I can make use of the <<remember>> macro or something, like in a way that allows the game to determine whether the player has completed both sides (via variables or something)?

Comments

  • (You should always make note of which story format you're using, as they differ in features and behavior, thus knowing which could be vital in giving correct help.)


    In the final/completion passage for each character you could do something like the following:

    <<remember $doneJack to true>>
    Or, if all characters use the same final/completion passage, something like this:

    <<if $name is "Jack">><<remember $doneJack to true>><<elseif $name is "Jill">><<remember $doneJill to true>><<endif>>
    Obviously, you'd trigger off of what you're already using to know which character is being played.

    Finally, at the beginning of the story you'd do something like:

    /% Allow selection of Jack and Jill by default %/
    <<if $doneJack and $doneJill>>
    /% Allow selection of Puck, if Jack and Jill have been completed %/
    <<endif>>
  • Alright, I am using Jonah though. The "remember" bit works fine, although I have no idea how the third set of codes (the one with "/%") works.

    Edit: Oh, never mind, I think I found a way to make this work or something.

    It looks something like this:
    <<if $doneJack is true and $doneJill is true>> Take [[Puck's path]]. <<else>> <<endif>>
  • CrowTengu wrote:

    [] I have no idea how the third set of codes (the one with "/%") works.


    The /% %/ bits are block comments.  They were there simply to explain what you needed to do.


    CrowTengu wrote:

    Edit: Oh, never mind, I think I found a way to make this work or something.

    It looks something like this:
    <<if $doneJack is true and $doneJill is true>> Take [[Puck's path]]. <<else>> <<endif>>

    [list type=decimal]
    Testing boolean variables against boolean literals (i.e. true and false) is pointless, so just use the boolean variables.
    Your do not need an &lt;&lt;else&gt;&gt; there, and you most certainly do not need an empty one.

    This is all you need: (as I noted before)
    <<if $doneJack and $doneJill>> Take [[Puck's path]]. <<endif>>
  • Right, thanks for the help. :)
Sign In or Register to comment.