(Gamebook) Conditional Story Navigation


So. I'm new to this game. I'm making a Gamebook story. I want to make it so that if you visited page "A", then when you're on page "B" a link will appear to page "C". Seems simple. I created a function to do this, which in code view is,

if (HasSeenPage(A)) {
AddPageLink (B, C, "text")

It doesn't work. At all. I've tried reversing B and C, because, why not, you could interpret it that way, but that doesn't work either.

Is it something to do with Return Type or Parameters that I don't understand?



Also new... but... (fast, and hopefully, helpful answer)
on the page tab, at the bottom, there is the page- link info...
(no code to work with)
You can make the links one way...
A to B to C...
or 2 way...
A to B...
B to A and C...
C to B and D or back to A...


I took a look at the 'AddPageLink' function and for whatever reason after testing it seems the added link will not show up if it's added as part of the current page. Seems like the page's links are already built before the function goes off. It will show up if you leave the page and come back, but that's obviously not ideal. After looking into some of the built in function's it unfortunately does not seem easy to manually re-display the page either.

Now this technique WILL work if you're adding the link from a different page ie: 'pageA' adds a link to 'pageB'.

Probably your best alternative is to manually build page links when you want this sort of thing using the text processor, specifically '{page:name:link text}'. The one thing to worry about there is formatting so that the links position looks okay.

Also a note about your original code, since you have no limiting factor and it's an add command revisiting that page will cause it to continually add a new link each time.


Kinda late, but it the script is entered in the "Before entering room" section, I think that will make the change before the room description is displayed.


Does that work for gamebooks? (I have no idea having never used the game book editor)


The Before script and the After scripts are in the UI...
It should work the same...

Log in to post a reply.