Howdy, Stranger!

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

Text box prompt

Hi guys,

writing a story on Harlowe, and am stuck again here. First let me explain the scene.

Passage 1:

David learns the gang that killed his father were the Blue Jackets

Passage 10:

David meets with a police officer who might be able to share the information. He asks David "Do you remember the gang name?"

Yes i do

No i don't

by clicking Yes i do, it takes the player to passage 11 which immediate displays a prompt text box (what is the gang name?"

if player answers blue jacket, he sees this passage "yeah i know them... Let me pull out a file on their leader"

If the player answers any thing else he sees "Nah, haven't heard of them.. i got nothing on file"

So ive got the text box to prompt the gang name, how do i link it the results typed in the the correct passage?

Thanks guys

Comments

  • well I am going to give this a shot, this should hypothetically work,
    (set: $name to (prompt: "What was the Gang Name?:"))
    
    of course you have passage 12 yeah i know.. and 13 which is nah... in passage 11 write this if command
    (if: $name is "blue jacket")[(display: "passage 12's name")] (else:)[(display: "passage 13's name")]
    
    of course replace passage 12's name with it's name obviously and all should work out
  • Remember to test if the $name variable actually has a value sometime after you ask the Reader to supply one, as some people will exit the prompt dialog without entering a value and that can effect your story's logic later on.
  • greyelf wrote: »
    Remember to test if the $name variable actually has a value sometime after you ask the Reader to supply one, as some people will exit the prompt dialog without entering a value and that can effect your story's logic later on.
    didn't know that thanks for the tip, set $name to a random variable in the beginning for e.g
    (set: $name to 0)
    
  • Or to an empty String even:
    (set: $name to "")
    

    Mostly I mean to test the value using an (if:) macro like so:
    (if: $name is "")[
    <!-- Place code here to loop the (prompt:) some how.. -->
    ]
    
Sign In or Register to comment.