Changing past links in Gamebook to normal text.

fl3000
07 Nov 2022, 14:28

Hello,
in Gamebook, if I deselect the Display-Option "Clear screen between each page", the old pagetexts will stay on screen. That's what I want. But while the old pagetexts are scrolling up when the story proceeds, the blue links within that old pagetexts stay blue and selectable. That makes no sense in my story, the old links should be changed into normal text after a selection has been done. RemovePageLink() did not work for me in this case. However, I found out, that by adding the line <options type='stringdictionary' /> to every pagesection in the sourcecode, it's working suddenly: all the old links will turn into normal text, after clicking on a link.

Is there a more elegant way to do this? Maybe in the global script of the "game" page?


mrangel
07 Nov 2022, 15:43

Yeah… when you click on a link, if the current page has an options attribute and the screen isn't cleared, it displays the text of the link from that dictionary corresponding to the destination page, and disables all other links.

If you want to disable all links, you can do that using the command:

JS.disableAllCommandLinks()

You should be able to put that into game.roomenter (the "Script" tab on the game object in the editor)