how to only allow link to be used once in game book

just wondering if there's a way to make links to a page only work once?
i'm putting writing and then a choice for the person playing but currently if you choose one of the options, the other option is still available to you after.
sorry if this is a stupid question, i've never done anything like this before :)

The simplest way would probably be to put a script on the page that the link goes to, using the function RemovePageLink.

{once:page link}

Both of the previous suggestions only work partially. It really depends on what exactly you're trying to do "only work once" is somewhat vague.

@mrangel's suggestion only works with links added either through AddPageLink () or the tedious function at the bottom of the graphic development enviroment.

@jmnevil54's suggestion, at the other hand, only work with in-text page links. (Althought correct syntax would be {once:{page:Page2}}) Also, this has the serious issue of hiding all links of a page after it has been visited, most likely turning it into a dead end the next time it is visitied.

Therefore, going with RemovePageLink (Page2, this) is the easiest way.

You can, however, achieve proper in-text links by using some if () { msg ("{page:Page1}") } shenenigans utilizing flags, if you wish so.

EDIT for clearification: Page1 in these examples is the page you're linking from, whereas Page2 is the page you were linking to.

This topic is now closed. Topics are closed after 60 days of inactivity.