Howdy, Stranger!

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

Need help setting (click:) questions to behave to my condition!!

On this passage the reader/player gets the option of 4 questions displayed, each with their own respective answers using the namedhook calls.

What I want is for the reader to select any of the questions displayed until the 4th selected question displays another answer that tells the reader the NPC is no longer interested in answer questions.

So far I've been unsuccessful in my attempts to right a decent condition.


Start of Passage
You [call out]<p1| to figure in the hole.

(click:?p1)[“What is it you want stranger, I’m busy.”

The figure replies, never taking its eyes away from its work.

It continues to dig, but seems responsive. You may ask it [questions]<p2| if you wish.]

(click:?p2)[
[What are you doing?]<cl1|
[That's quite a hole you've dug for yourself...]<cl2|
[Excuse me, do you know where the fog went?!]<cl3|
[Do you know where we are?! How we got here?!]<cl4|
{
(if: $clickcount > 3)[(display: "Aftercallout")]
(elseif: $clickcount < 3)[(click:?cl1)["Isn’t it obvious! These were shattered during transfer, so I’m getting rid of the evidence.]](else:)[(set: $clickcount to it + 1)]
}
{
(if: $clickcount > 3)[(display: "Aftercallout")]
(elseif: $clickcount < 3)[(click:?cl2)["This is nothing. You should see all the other holes I've dug up in this place."]](else:)[(set: $clickcount to it + 1)]
}
{
(if: $clickcount > 3)[(display: "Aftercallout")]
(elseif: $clickcount < 3)[(click:?cl3)["<i>the figure briefly pauses</i>… <i>then continues digging.</i>"]](else:)[(set: $clickcount to it + 1)]
}
{
(if: $clickcount > 3)[(display: "Aftercallout")]
(elseif: $clickcount < 3)[(click:?cl4)["I’m certain I’ve read the answer on a pamphlet somewhere."]](else:)[(set: $clickcount to it + 1)]
}]
End

"Aftercallout" is the is the passage/result text I would like to show up for any 4th question clicked.

Can anyone help? You're my only hope!...sorta

Comments

  • edited January 2017
    Don't you need the 'end if' closing tag, unless it's different in Harlowe? I'm primarily a Sugarcube user. I'm unsure, but it looks like you may be missing some ]'s in your code example, but I'd definitely wait for someone more experienced with Harlowe.
  • I changed quite a bit of this, but the text is the same. Here's the main stuff I did.
    - Changed the "> 3" parts of the "if" statements to "is 4" and the "< 3" parts to "< 4"
    - Completely removed the "else" parts and moved the clickcount variable changes to the beginning of each click result (The "else" parts were making it so that the clickcount variable didn't change, as they said that the current clickcount had to be a number that isn't less than 3, greater than 3 or equal to 3)
    - Added spaces between each click result to make it easier to read

    You should be able to simply copy/paste this into your story. Make sure that you have a passage called "Aftercallout" that contains what you want the character to say when they don't want to talk anymore.
    You [call out]<p1| to figure in the hole.
    
    (click:?p1)[“What is it you want stranger, I’m busy.”
    
    The figure replies, never taking its eyes away from its work.
    
    It continues to dig, but seems responsive. You may ask it [questions]<p2| if you wish.]
    
    (click:?p2)[
    [What are you doing?]<cl1|
    [That's quite a hole you've dug for yourself...]<cl2|
    [Excuse me, do you know where the fog went?!]<cl3|
    [Do you know where we are?! How we got here?!]<cl4|]
    
    {
    (click:?cl1)[(set: $clickcount to it + 1)[(if: $clickcount is 4)[(display: "Aftercallout")]
    (else-if: $clickcount < 4)["Isn’t it obvious! These were shattered during transfer, so I’m getting rid of the evidence."]]]
    }
    
    {
    (click:?cl2)[(set: $clickcount to it + 1)[(if: $clickcount is 4)[(display: "Aftercallout")]
    (else-if: $clickcount < 4)["This is nothing. You should see all the other holes I've dug up in this place."]]]
    }
    
    {
    (click:?cl3)[(set: $clickcount to it + 1)[(if: $clickcount is 4)[(display: "Aftercallout")]
    (else-if: $clickcount < 4)["<i>the figure briefly pauses</i>… <i>then continues digging.</i>"]]]
    }
    
    {
    (click:?cl4)[(set: $clickcount to it + 1)[(if: $clickcount is 4)[(display: "Aftercallout")]
    (else-if: $clickcount < 4)["I’m certain I’ve read the answer on a pamphlet somewhere."]]]
    }
    
Sign In or Register to comment.