Ways to make options not expire after clicking them?

Beee
10 Jun 2021, 22:33

Sorry if this has been asked before, I'm very new to the software. I was wondering if there's a way to make it so after an option is clicked, it remains an option until a certain series of events is carried out. e.g. if they go to a fountain before collecting a bucket, they cannot interact with the fountain, however if they go get the bucket and return to the fountain, they are now able to collect water. Thank you!


mrangel
11 Jun 2021, 22:03

I think that should work. If you go back to a section you've visited before, the links should be active again.

If you're using passages rather than sections, it's only the link rather than the passage that has been disabled; so you could easily add another link after getting the bucket. But if you want to re-enable a link, the easiest way is to use @replace to enable it again.

You could do something like this:

[[fountain]]:

You are at a fountain. You can attempt to {if got_bucket:[collect water] from it}{else:{label:l=[collect water](no bucket)}, or go and [get a bucket](get bucket,@replace l=bucketlink)}.

[bucketlink]:
[collect water]

[no bucket]:
You try, but your hands aren't that good for scooping up water.

[get bucket]:
@set got_bucket

You grab the bucket

[collect water]:

You gather some water!

Mr.Dot
15 Jun 2021, 14:07

Here, to simplify:

passages won't make options expire
sections will make all previous options expire.

boom.

by the way: [[]] = section, [] = passage


mrangel
15 Jun 2021, 17:24

passages won't make options expire

Clicking on a passage link disables that link, as Squiffy assumes you won't want to click the same link twice. I got the impression this is what the OP wants to do – let the player keep trying until they are successful.


Bluevoss
17 Jun 2021, 20:04

Sure, you can always make everything a section and loop back to the initial section to keep the link active.