Howdy, Stranger!

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

Trouble changing set variables.

Hi! I was trying to create a story in Harlowe, but I ran into a problem. I can't for the life of me make the player choose a variable and then store it. I'm trying to set hair colors to be able to refer to it later.

This is the code I have (I did set it at the start of the story):

<b>Hair color:</b> Intro][$HairColor to "black" | Intro][$HairColor to "blonde" | Intro][$HairColor to "red" | Intro][$HairColor to "auburn" | Intro][$HairColor to "brown"<br>

Thank you for your help!

Comments

  • Harlowe does not support Setter markup links.

    The equivalent of Intro][$HairColor to "black" would be:
    (link: "Black")[
    	(set: $HairColor to "black")
    	(go-to: "Intro")
    ]
    
    ... I added line-breaks and indentation to the above to make it more readable, the following is the same code without those:
    (link: "Black")[(set: $HairColor to "black")(go-to: "Intro")]
    
  • Oh, I see, thank you!
Sign In or Register to comment.