Hidden Conditional Choices


#1

Hi there! I’m pretty new to the choice script language and I’m having some trouble early on that I’d like to get some help with, as I plan to include a lot of choices with similar programming.

One of the first choices you make in the game is whether you’re male or female. Then, you’re given a choice of three names. If you’re male, you only see the male names, and if you’re female, you only see the female names. So it’s hidden conditional choices.

*create startup_gender true

You were born ...

*fake_choice
  # ... a boy, handsome, with hair like your father's.
  # ... a girl, beautiful, with eyes like your mother's.
    *set startup_gender false

You were given a name to reflect your parents' values.

*choice
  *if startup_gender false # Marina, a shining beacon in a storm.
    Your name is Marina.
    *set firstname "Marina"
    *goto world
  *if startup_gender false # Lapine, a fleetingness of foot.
    Your name is Lapine.
    *set firstname "Lapine"
    *goto world
  *if startup_gender false # Helain, the warmth of a bonfire.
    Your name is Helain.
    *set firstname "Helain"
    *goto world
  *if startup_gender true # Falorn, a wailing in the wind.
    Your name is Falorn.
    *set firstname "Falorn"
    *goto world
  *if startup_gender true # Neb, a small name for a strong will.
    Your name is Neb.
    *set firstname "Neb"
    *goto world
  *if startup_gender true # Kerateck, the coarseness of a bear's fur.
    Your name is Kerateck.
    *set firstname "Kerateck"
    *goto world
  # I'd like to choose my own name.
    Your name is:
    *input_text firstname
    *goto world

*label world

Hello world.

When I run this, I get:

startup line 15: Invalid expression, couldn’t extract another token:

Clearly I’m making a pretty basic beginner error here, but I wrote it as best as the tutorial suggested. Can anyone give me an example of good practice of how to format choices like this?


#2
*choice
  *if (foo = bar) #Option.
    Effect.
  1. Make sure you use an equals sign when testing.
  2. Make sure that you wrap the equation in parentheses.

#3

Ha ha I got it!

*if (startup_gender = false) # Marina, a shining beacon in a storm.

#4

I’d recommend this one, tho.

*choice
   *if true
      #Option 1
         Word 1
      #Option 2
         Word 2
   #Option 3
      Word 3

#5

Final set-up of this particular line:

*choice
  *if (startup_gender = false)
    # Marina, a shining beacon in a storm.
      *set firstname "Marina"
      *goto world
    # Lapine, a fleetingness of foot.
      *set firstname "Lapine"
      *goto world
    # Helain, the warmth of a bonfire.
      *set firstname "Helain"
      *goto world
  *if (startup_gender = true)
    # Falorn, a wailing in the wind.
      *set firstname "Falorn"
      *goto world
    # Neb, a small name for a strong will.
      *set firstname "Neb"
      *goto world
    # Kerateck, the coarseness of a horse's mane.
      *set firstname "Kerateck"
      *goto world
  # I'd like to choose my own name.
    *input_text firstname
    *goto world

*label world

Looks much better! Thanks for the suggestion on how to clean it up a little.