Howdy, Stranger!

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

Is It Possible To Randomize Text

Is it possible to do something like "Gender: Male" where Male would be clickable to change to "Female" or other options in 2?

Comments

  • You need to state which story format you are using, as answers can be different for each one.

    The simple answer is Yes.
  • greyelf wrote: »
    You need to state which story format you are using, as answers can be different for each one.

    The simple answer is Yes.

    Oop, sorry, using Harlowe.

  • There are a number of things you don't state in your original question:

    1. Can Gender be changed only once or multiple times:

    1a. If only once then you could do something like the following:
    Gender: [Male]<gender|
    (click-replace: ?gender)[(either: "Female", "Neuter")]
    

    1b. If multiple times, then you are going to need to re-attach the (click-replace:) after each selection.
    Add the following to the passage you want the question to appear:
    Gender: [Male]<gender|
    (click-replace: ?gender)[(display: "Random Genders")]
    
    ... and add the following to a new passage named Random Genders:
    (either: "Female", "Neuter", "Male")(click-replace: ?gender)[(display: "Random Genders")]
    

    2. Are you using a $variable to track the current Gender and if so should that $variable be updated with the new Gender:
    (set: $gender to "Male")
    
    Gender: [$gender]<gender|
    (click-replace: ?gender)[(set: $gender to (either: "Female", "Neuter"))(print: $gender)]
    
Sign In or Register to comment.