It displays the text "correct" but not the link...
(You're on page 4, and page 5 is a proper link)
if (result = "password")
{
msg ("that is correct")
AddPageLink (page 4, page 5, "correct")
}
Is your pages...
page 4 or page4
???
or could it be Page4 or Page 4
???
Your code looks good, BUT, it looks like there needs to be refresh command to show the exit...
Oh hey, just as a tip if you didn't know this, put LCase in so the player can enter the password in any case (i.e. PASSWORD, Password, password, paSSWord, etc.)
GetInput() {
if (LCase (result) = "hello") {
msg ("Why, hello.")
AddPageLink (Page1, Page2, "WINNER!")
}
else {
msg ("Nope.")
AddPageLink (Page1, Page3, "LOSER!")
}
}
Oh hey @brenden.winger you're right, your original question doesn't work. I'm a noob but have been off and on writing a Gamebook for a couple years and asking questions here. Most of the folks here aren't Gamebook mavens, most of them like the text adventure style of game. But they always try to help. Anyway:
I just tried this and it worked! You have to "MovePlayer" and not try to "Add" a link!
GetInput() {
if (LCase (result) = "hello") {
msg ("Why, hello.")
MovePlayer (Page1)
}
else {
msg ("Nope")
MovePlayer (Page2)
}
}
In other words, I suppose as a workaround, I think you have to "Move" them to a page, and then add the links on that page.
oh! Thank you! I'll try that.
I'm so poor with coding that I felt it would be best to stick with gamebook and learn the basic coding when necessary.