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

How can I reset a true variable back to false?

$
0
0
At first I made this a new discussion before I reread the "First time Posting" discussion and realized I should have clicked on "Ask Question". Sorry about that :/

I am using the Harlowe 2.0 format and using it online. I have some riddles in my story with multiple answers. I want the player to choose the correct answer first before they can move to the next puzzle. So far this is what I got:

Passage "blue cap":

Two college kids got kicked out of college. Their dorm room was on the third floor. They have to move all their belongings from the third floor to the first floor. The larger student can carry two boxes at a time, and it takes him one minute to get to the first floor. The smaller student can carry only one box at a time, but it takes him just 30 seconds to make it to the first floor. For both students, the return trip to the third floor is the same as the trip down.

If there were seven boxes total, how many minutes would it take the students to get all the boxes to the first floor?


It would take:

[[seven minutes]] Pick me!

[[three minutes]] No me!

[[five minutes]] No, pick me!


Passage "seven minutes"
No.

(link-goto: "Try Again", "blue cap")

(set: $sevmins's isSelected to true)

Passage "three minutes"

Yes!

(if: $sevmins's isSelected is false)[Now look for a [[red cap]]]

(if: $sevmins's isSelected is true)[Now solve the puzzle in one try to move on to the next puzzle. (link-undo: "Go back")]


I thought the, (link-undo: "Go back"), would reset the $sevmins's isSelected to true back to false, so this, "
(if: $sevmins's isSelected is false)[Now look for a [[red cap]]]" would appear in the "three minutes" passage. However, this does not appear, but this does, "(if: $sevmins's isSelected is true)[Now solve the puzzle in one try to move on to the next puzzle. (link-undo: "Go back")]".

What am I doing wrong? or, is this not possible to do in Harlowe?

Thanks in advance and I'm sorry if I left out any information that would make it easier to help answer my questions.

I tried this:

Passage 3:
(click: ?goback)(set: $goback's isSelected to true)(set: $sevmins's isSelected to false)

and it works, but it says this, "The (click:) command should be assigned to a variable or attached to a hook.►"

Viewing all articles
Browse latest Browse all 1844

Trending Articles