Add page link using script issue

Gareth Ward
28 Jan 2020, 01:50

Hi to everyone, I'm a traditionally published author and I'm looking to create some adventures to link in with my book series. I have coding experience but I am new to Quest. I feel that for the most part gamebook suits my needs best.

Using gamebook, when I use the add page link script after I have gathered player input the links do not appear.

If I get rid of the player input the links work fine. Any suggestions please of how to fix this?

Basically I don't want the player to be able to select a link until they have input their name.

Any help would be greatly appreciated.

  player.alias = result
  msg ("Nice to meet you " + player.alias +". Come on we've got a mission")
  AddPageLink (Wokenatmidnight, Page2, "Roll over and go back to sleep.")
  AddPageLink (Wokenatmidnight, Page3, "Get up and get dressed.")
}

mrangel
28 Jan 2020, 02:17

When you ask the player to input a string, the result is processed the next turn. After that, you're adding links to the page, but the page's links aren't displayed to the player because they haven't just reached that page.

There are some really messy solutions to this using code; but the simplest is just to put that message and the links on a new page, and move the player there after they enter their name.


Gareth Ward
28 Jan 2020, 02:50

Cool. Thanks. That works great.