Howdy, Stranger!

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

Giving readers options to slow or speed up how the text appears.

HI, I havea question about text speed.

I am using sugarcane, Twine 1.4. And not very good with macros (javascript novice).
I'm using timedcontinue (wonderful thing!) to make the text in my passage appear paragraph by paragraph. However I'd like to make this accessible for slower readers, without forcing them to abandon the tension. So far my text looks like this:

Start Passage
Please select your preferred reading speed (does not apply to interludes):

[[Quick|Colour scheme][$gameSpeed = "quick"]]
[[Average|Colour scheme][$gameSpeed = "average"]]
[[Relaxed|Colour scheme][$gameSpeed = "relaxed"]]

Sample Passage
<<if $gameSpeed == "quick">><<timedcontinue 2s>><<else if $gamespeed == "average">><<timedcontinue 4s>><<else>><<timedcontinue 6s>><<endif>>...and on the farmlands the prodigal Son stood...

<<if $gameSpeed == "quick">><<timedcontinue 2s>><<else if $gamespeed == "average">><<timedcontinue 4s>><<else>><<timedcontinue 6s>><<endif>>Foretelling the death of hell.

and so forth. It's clunky, inefficient, and doesn't work anyway because the <<>> around timedcontinue blocks everything. I tried setting it as a variable in the start passage, but that didn't work either.

I've also tried printing numbers inside the command <<>> bit, but to no avail. eg. <<timedcontinue <<print $quick>>>>

Is there anyway to make timedcontinue a variable, or a way to bypass the <<>>?

Thanks in advance.

Comments

  • edited June 2015
    EDIT: Disregarding everthing I say below, are you using the correct elseif syntax? It shouldn't have a space: <<elseif>> not <<else if>>. It may be not the <<timedcontinue>> which is playing up, but that you're getting the elseif syntax wrong.

    Since, if you write <<else if>>, nothing will work.



    You need to include the entirety of each option inside its own individual area. For example:
    <<if $gamespeed is "quick">><<timedcontinue 2s>>...and on the farmlands the prodigal son stood..."
    <<timedcontinue 2s>>
    Foretelling the death of hell.<</if>><<if $gamespeed is "average">><<timedcontinue 4s>>...and on the farmlands the prodigal son stood..."
    <<timedcontinue 4s>>
    Foretelling the death of hell.<</if>><<if $gamespeed is "slow">><<timedcontinue 6s>>...and on the farmlands the prodigal son stood..."
    <<timedcontinue 6s>>
    Foretelling the death of hell.<</if>>
    

    This passage will only display one set of text based on the selected speed.

    You can tighten it up by using <<elseif>> for each new text speed, but I just separated it into 3 different <<if>> statements to be clear. Make sure there are no line breaks between the end of one <<if>> and the start of another.

    To do this quickly I would write the whole story out first, then copy paste each passage inside itself two times.
  • edited June 2015
    However, while that answers your direct question, there is an alternative way of doing it that does not need variables. Whether it takes more or less work really depends on how many links you have, since it involves changing the name of every passage and link twice over.

    First, write your story assuming just one text speed. Then, publish the story to file, rename the html file, and import the story into Twine. Rename the story name, and go through and change the <<timedcontinue>> values. Also change the name of each passage, by for example just inserting a "b" or "c" onto the end of each passage name. You'd then have to update the links within each passage to reflect the new passage names.

    Do this once more again so you end up with 3 different stories, one for each text speed, each with its own unique passage names.

    Now alter the two copy stories so that they do not have the "choose your speed" title passage. Instead, start them at the first real passage with text. Now this is done, do something like the following in your first story first passage:
    Please select your preferred reading speed (does not apply to interludes):
    
    [[Quick|Farm1]]
    [[Average|Farm1B]]
    [[Relaxed|Farm1C]]
    

    Now in your first story, use the "Story Includes" feature to include the second and third stories into your first story. So now when the user players it, they will be redirected to one of the copy stories if they choose average or slow speed.
Sign In or Register to comment.