Help with Page linking
gatoradeburn
19 Apr 2016, 05:26Hey, I want a link on one page to change what page it sends someone to after a certain page has been visited. is this possible?
HegemonKhan
19 Apr 2016, 14:12I'm not familiar with the Game Book version, so I'm not sure how the page links work/are-set-up, but this is the concept:
let's say that 'page10' Page takes you to 'page15' Page, unless you've already encountered 'page 30' Page, in which case, 'page10' Page will take you to 'page99' Page:
'page10' Page -> Page Type -> [script] or [text+script]
run as script -> add new script -> scripts -> 'if' Script -> [EXPRESSION] and type/code it in yourself (see below), or whatever correct [xxx] option instead
run as script -> add new script -> variables -> 'set a variable or attribute' Script -> [EXPRESSION] and type/code it in yourself (see below), or whatever correct [xxx] option instead
in code example:
the Game Book version, may not have the 'visited' built-in Boolean Attribute, so, in which case, you'd have to create your own Boolean Attribute and set it up and handle it correctly.
also, again, the Game Book version may not have/use the 'parent' Attribute and/or no the 'MoveObject' Script/Function for determining what page to be-at/move-to
let's say that 'page10' Page takes you to 'page15' Page, unless you've already encountered 'page 30' Page, in which case, 'page10' Page will take you to 'page99' Page:
'page10' Page -> Page Type -> [script] or [text+script]
run as script -> add new script -> scripts -> 'if' Script -> [EXPRESSION] and type/code it in yourself (see below), or whatever correct [xxx] option instead
if [EXPRESSION] page30.visited
run as script -> add new script -> variables -> 'set a variable or attribute' Script -> [EXPRESSION] and type/code it in yourself (see below), or whatever correct [xxx] option instead
// for the 'if true' action:
set variable player.parent = [EXPRESSION] page99
// for the else (if false) action:
set variable player.parent = [EXPRESSION] page15
in code example:
if (page30.visited) {
player.parent = room99
}
else {
player.parent = room15
}
the Game Book version, may not have the 'visited' built-in Boolean Attribute, so, in which case, you'd have to create your own Boolean Attribute and set it up and handle it correctly.
also, again, the Game Book version may not have/use the 'parent' Attribute and/or no the 'MoveObject' Script/Function for determining what page to be-at/move-to
gatoradeburn
19 Apr 2016, 21:09thanks for the quick reply, I think ill be able to figure it out now.
HegemonKhan
19 Apr 2016, 21:12let us know if you still need help, as I'm just lazy... I can open up a GameBook and see how its done and get back to you, let me know if you still need help, and I can help you through it step by step.
gatoradeburn
19 Apr 2016, 22:23I figured it out. Step one was turning the page to Script + text. step two was adding the an if then statement Via the in program script maker. The script said " if page three has been seen the remove link from page Q to page W and add link From page Q to page E. looks like this
if (HasSeenPage(F2 RR Valve)) {
AddPageLink (Sub porch, F1 RR HVAC, "Go through the grate")
RemovePageLink (F1 RR HVAC, Ash Gate)
if (HasSeenPage(F2 RR Valve)) {
AddPageLink (Sub porch, F1 RR HVAC, "Go through the grate")
RemovePageLink (F1 RR HVAC, Ash Gate)