However, what I really want to do is for the first link to set the variable $sex to "female" and the second link to set the variable $sex to "male".
I'm going to assume this is a typo and you want it the other way around. Here's what I would do,
(link: "You are a baby boy and your parents name you Oren.")[
(set: $sex to "male")
(go-to: "Next Passage")
]
(link: "You are a baby girl and your parents name you Serena.")[
(set: $sex to "female")
(go-to: "Next Passage")
]
You don't really need to use both (if: $sex is "male) and (if: $sex is "female"); an if-else statement would be more suitable. Let's say you set male to be the default gender in your startup passage. Then you could do something like this,
(if: $sex is "male")[You walk into the male bathroom.](else:)[You walk into the female bathroom.]
Obviously you can do this the other way around and set female to be the default if you wish.