I did some research for a couple days, crossing this forum and the old Google group, so I was hoping I might be able to make myself as clear as possible to know if this was even doable, and if so, how.
I hope for the back button to be disabled at certain points in the story, and the player can't go backward beyond that point. Sort of like a one-way link, I want two links available for the player to choose, and upon clicking one, they go into the branch of story without being able to return to the passage with the choice I previously gave.
Sort of a way to keep players from- I don't know- being indecisive, I guess.
Don't want to disable the back button completely, because I want them to be able to go back to read anything they want...but only up to the point I designate.
Is this possible?
Comments
I can think of two ways to achieve what you want:
1. As Hanon Ondricek stated, you could use java-script to disable the back button on the Passage(s) that the Reader see directly after the Passage containing the Branching links, this would stop them from being able to return to the Branching links. You would have to re-enable the back button after that passage.
eg. Given the following set of passages, where B is the passage that contains the branching links that you don't want the user to be able to revisit. You would disable the Back button in passages C & E, and re-enable the Back button in passages D & F.
2. The second option would be to delete/clear out all the relevant history information when the user reaches passages C & E, though I don't know of any story header feature that allows you to do this, nor do I know what the other ramification of doing this would be. You would need to talk to either Leon or TheMadExile about this depending on if your using Sugarcane or SugarCube.
Not as you've described, no. The only way to take control over the browsers' back/forward buttons is to use the Window History API. Unfortunately, browsers' Window History API does not give the amount of control required to pull this off. Notably, it only allows you to add new states and replace the current state, not modify arbitrary states within the history. In other words, you cannot turn it off and on upon demand nor can you invalidate past/non-current history states.