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

Harlowe String Compare

$
0
0
Hi. Please help me out. I have a set a variable $hypothesis to a string that is created at runtime in the story. Is there a way to compare a string against the variable or specifically look for word or phrase within the string?

Example: (set: $hypothesis to "Sugar, Spice, Everything Nice and Chemical X")
(if: $hypothesis is ""Sugar, Spice, Everything Nice and Chemical X")[Powerpuff Girls!]
(else-if: $hypothesis contains "Chemical X)[You die in an explosion]
(else:)[Nothing happens]

When I use this nothing by the last else is returned. Help please.

Viewing all articles
Browse latest Browse all 1844

Trending Articles