Howdy, Stranger!

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

Blank spaces due to history depedent text/links

Hi! I'm super new to this (as in just started using Twine today) with incredibly basic CSS/HTML knowledge. I''m trying to make something that doesn't really use complicated variables but still incorporates past "knowledge." So, my workaround involves using (if: (history:) contains "xyz" [] like so -

Merry1

-"Merry1" will give you a description of the woman with the option to go back, where you would then see the following -

(if: (history:) contains "Merry1") [The woman has now noticed you.]

I also figured out to get that to work with links, thanks to other helpful threads on this forum.
The only problem - besides not knowing how to make the history reset if I were to send someone back to the beginning, which is a problem for another day - is that when I test it out, there's a big blank space where the text is going to appear. While I guess that would forecast that the player needs to click on things to make sure that space is filled, is there any way to hide it to make it look more natural?

Thanks in advance!

Comments

  • It's helpful if you can provide a copy of your html file (the one you generate after using the "Publish to File") so we can see what is goin on.

    But from what I understand of what you are saying, you can try to use the (if:) macro first with an (else:) for the text that is normally displayed. You can also use the { and } brackets at the start and end of the code, and that would/should deal with your space issues.

    Here's what I mean:
    {
    (if: (history:) contains "Merry1")[The woman has now noticed you.]
    (else:)[[[A grinning young woman, twirling a dagger while she tries to convince a terrified patron that he should be their glorified beast of burden|Merry1]]]
    }
    

    I have attached a HTML file for you to check out and see if it works the way you want it to.
  • Another option for the "resetting" the history thing is to not use the (history:) at all, and just use simple variables.

    For example in your "beginning" passage you could put:
    (set: $merry to false)
    

    Then in your other passage (that has "A grinning youg woman...") you would set it up like this:
    {
    (if:$merry is true )[The woman has now noticed you.]
    (else:)[[[A grinning young woman, twirling a dagger while she tries to convince a terrified patron that he should be their glorified beast of burden|Merry1]]]
    }
    

    And in Merry1 you would add the following code (along with the link going back to the previous passage):
    (set:$merry to true)
    

    That way, each time you send someone back to the "beginning" passage, the $merry variable is reset to false, and they would have to go through to Merry1 again before seeing "The woman has now noticed you."

    There is probably a way of resetting the (history:) or removing certain passages from it, but I am not familiar with that method, which is why I am suggesting a simple variable based one.
  • You don't want to ever mess around with trying to remove things from history. If you need that, use variables.
  • It kinda seems like you're working hard not to do something easy. Counterproductive, in other words. My suggestion would just be to use variables.
  • Another issue with using (history:) is that as the Reader processed through your story the list of passages within (history:) gets longer and longer, so the number of entries in (history:) that need to be checked to determine how many times the Reader has seen a particular passage gets larger and larger, which means it takes a little longer each time to check all the entries in (history:)

    For most stories this may not cause a problem because generally they don't have than many passages within the Readers path through the story, but if you are planing on creating a RPG or a story that has long paths then it can become an issue if (history:) is used too often.
  • Thanks for the help, everyone! I'll start experimenting with the (else) function and variables right away,
Sign In or Register to comment.