I have text thats supposed to display if the player did some specific choice earlier in the game, and in more than a few instances the text that's to be displayed should be a link.
For example, I have this as dialogue an NPC can say to the player:
(if: $goodres >= 0 and $badres is 0)[Well, you're pretty ok so far... (if: $count is true)[and you did count all those buttons...] ok, I think I'm permitted to show you more information.]
I have another if statement that I want to display a passage link if the above count variable is true, but no matter what I try out, it always shows it, regardless of whether or not the variable is true (it passes the badres check, though):
(if: $badres > 1)["No."
[[Come on, dude.]]
(if: $count is true)[[Does the fact that I counted those buttons mean nothing to you?]]]
I've messed with order of statements and number of brackets, but nothing has helped. I'm still new to programming in this, so I'm sure I've missed something small.
Comments
Additionally, all conditionals evaluate down to booleans in the end, so you don't have to compare a boolean value to a boolean literal—just use the boolean value. For example, instead of: You can simply do:
a. A markup link has two open square brackets at the start and two close square brackets at the end: b. The associated hook of an (if:) macro has a single open square bracket at the start and a single close square bracket at the end: c. Twine 2 has problems parsing three open square brackets in a row when two of those square brackets belong to a markup link, so you need to add a space character between the first and second square bracket:
Your second code example should be:
note: both the (if: $count is true) in your two examples could be written as (if: $count) because the value in the $count variable is a boolean (true/false)
edit: TME beat me this time. lol