Howdy, Stranger!

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

no going back

I'm in Twine 2, with the default format. I have created a story in which whatever choice the reader makes s/he can go back using the half circular arrow to the left of my story.
I would like that for one passage in particular there is no turning back (though for all others, I want the reader to be able to go back)

How do I do this?

In the reference materials for Twine1.4, I read something like <<choices>> would do that (though I wasn't clear on how to use it.) But when I wrote <<choices>> into my Twine2 text block, I got an error message "macros don't work the same way in Twine2 as in Twine1)
To be clear, I have never used Twine 1 and only started in Twine 2 yesterday.
Have read a lot of the forum and the wiki, but could not find the answer.

Many thanks in advance

Comments

  • The Harlowe documentation can be found here, because the Harlowe story format (the Default) was created especially for Twine 2.x any information written for Twine 1.x will be of little or no use.

    The Undo button can be temporarily hidden using the following javascript:

    $('tw-icon[class="undo"]').hide()
    The issue is that currently there is no easy way to call javascript in Harlowe, instead you have to use a hack.

    1. Add the following code to your Story Javascript, it defines an Undo.hide() function.

    if (typeof Undo == "undefined") {
    var Undo = {
    hide: function() {
    $('tw-icon[class="undo"]').hide();
    }
    };
    window.Undo = Undo;
    }
    2. The follow example contains three passages, in the Middle passage a call to the Undo.hide() function is used to hide the Undo button when the passage is displayed:
    (note: the following is in TWEE notation, lines starting with two colons indicate a new passage, the text on the same line as the two colons is the new passage's title.)

    :: Start
    The Start passage
    [[Next->Middle]]


    :: Middle
    The Middle passage, it should have ''no'' Undo button.
    [[Next->End]]

    <div style="display: none;"><img src="!@#$" onerror="Undo.hide();" /></div>


    :: End
    This is the End passage, it should ''have'' an Undo button!
  • Thanks Greyelf, both
    1) for the documentation to Harlowe (must admit that I'm new to programming, except for SAS, which is based on the 1950's PL1. I guess it will date me if I say that in university, I had studied Fortran and the then new Pascal)
    and
    2) for the code to achieve my goal. I'll give it a try, and keep learning Twine programming as I go. I'm always learning. Actually in a Masters in Language Studies to whom I am presenting this tool.

    Cheers,
    Kasla NTienn (the name works better in French ;-)
  • KaslaNTienn wrote:

    1) for the documentation to Harlowe (must admit that I'm new to programming, except for SAS, which is based on the 1950's PL1. I guess it will date me if I say that in university, I had studied Fortran and the then new Pascal)

    I first started coding when I was 14 and I have continued ever since. I turn 50 later this year so you do the maths! LOL
    Ah the good old days! *sigh*
Sign In or Register to comment.