im sure there is an easier way to do this that works but as i just stared using twine today i do not know it but this is what i have so far
story start
is your character going to be
male or
female
female
(set:$gender to "female")
(set: $rivalGender to "male")
(set: $selectedfemale to "yes")
start of story
male
(set: $gender to "male")
(set: $rivalGender to "female")
(set: $selectedmale to "yes")
start of story
start of story
your gender $gender
your rivals gender $rivalGender
(if: $selectedmale eq "yes"
this is the text to display if pc is male
)
(if: $selectedfemale eq "yes"
this is the text to display if pc is female
)
the error msgs i get are :
☕ Unexpected identifier►
This error message was reported by your browser's Javascript engine. I don't understand it either, but it usually means that an expression was badly written.
☕ Unexpected identifier►
This error message was reported by your browser's Javascript engine. I don't understand it either, but it usually means that an expression was badly written.
Comments
You need to state which story format you are using, as answers can be different for each one. Based on your code example I will assume you are using Harlowe.
1. Your code example has syntax errors in it, the (if:) macros are missing an end ) parenthesise and the associated hooks are missing both the start [ and end ] square brackets. The following should work: 2. Because both $selectedmale and $selectedfemale can't equal "yes" at the same time you could replace both of the (if:) macros in the start of story passage with the following:
and yea im using harlow as it is set up as the default though i will eventually check out the other 2 formats after ive had some time learning how twine works
Although if you are doing a lot of substitutions can save some typing.
Everything else is controlled/defined by the Story Format you choose to use, this includes the macro syntax, what core macros are available, the structure of the story HTML, the base look of the story and any other features the story format supports.