Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

[Harlowe] Using hook values in string comparisons

$
0
0
Last last I noticed that if you have a hook whose value is "creature":
You see a [creature]<thing|

You can ask for the value of ?thing to be outputted to the screen like this:
?thing


Output: creature

Which might make you think it is a string that can be compared with other strings. But then if you try this:
(if: ?thing is "creature")[It's a creature!](else:)[It's no creature.]

then the two do not match. It seems like ?thing !== "creature" The only way I got the two to match was by creating a new string from the hook and then comparing that string with my string.

I'm not sure if this is a technical issue or if "is" only returns true when the two objects are the same type.

Viewing all articles
Browse latest Browse all 1844

Trending Articles