by Debaser » Thu Jun 24, 2004 10:53 pm
Oddly, when I tried to steal the help menu code for use in the table of contents in a book, it didn't work. Code replicated here:
Code: Select all
routine DoReadGrimoire
{
if (diogrimoire in player)
{
"You recognize the familiar scrawl of your own, cramped handwriting upon the pages of this grimoire. You peruse its contents thoughtfully, hoping to find a trick or secret to get you out of your current predicament..."
pause
local a = 1
TEXTCOLOR = BRIGHT_WHITE
BGCOLOR = BLACK
MENU_TEXTCOLOR = DEF_FOREGROUND
MENU_BGCOLOR = DEF_BACKGROUND
MENU_SELECTCOLOR = DEF_SL_FOREGROUND
MENU_SELECTBGCOLOR = DEF_SL_BACKGROUND
while true
{
menuitem[0] = "BOOK OF SECRETS"
menuitem[1] = "Preface"
menuitem[2] = "A Desperate Invocation"
a = Menu(2, 0, a)
select a
case 0
{
TEXTCOLOR = DEF_FOREGROUND
BGCOLOR = DEF_BACKGROUND
color TEXTCOLOR, BGCOLOR
window 0
cls
PrintStatusline
DescribePlace(location)
return
}
case 1: GrimPreface
case 2: GrimDesperate
}
}
else { "You need to be carrying your grimoire to reference it." }
}
routine GrimPreface
{
CenterTitle("\BPreface\b")
"\nAt the time I put pen to paper on this"
pause
}
routine GrimDesperate
{
"a"
pause
}
Somehow, changing "routine DoReadGrimoire" to "replace DoHelp" fixed it. While the help menu logic doesn't
seem sufficient to cover eveything the menu does, I'm also completely lost as to how a replaced help routine is activating the super-secret library codes I need to get things to work right.
Any explanations and/or tricks to getting more than one help-menu style menu in one game? Thanks in advance.
Oddly, when I tried to steal the help menu code for use in the table of contents in a book, it didn't work. Code replicated here:
[code]routine DoReadGrimoire
{
if (diogrimoire in player)
{
"You recognize the familiar scrawl of your own, cramped handwriting upon the pages of this grimoire. You peruse its contents thoughtfully, hoping to find a trick or secret to get you out of your current predicament..."
pause
local a = 1
TEXTCOLOR = BRIGHT_WHITE
BGCOLOR = BLACK
MENU_TEXTCOLOR = DEF_FOREGROUND
MENU_BGCOLOR = DEF_BACKGROUND
MENU_SELECTCOLOR = DEF_SL_FOREGROUND
MENU_SELECTBGCOLOR = DEF_SL_BACKGROUND
while true
{
menuitem[0] = "BOOK OF SECRETS"
menuitem[1] = "Preface"
menuitem[2] = "A Desperate Invocation"
a = Menu(2, 0, a)
select a
case 0
{
TEXTCOLOR = DEF_FOREGROUND
BGCOLOR = DEF_BACKGROUND
color TEXTCOLOR, BGCOLOR
window 0
cls
PrintStatusline
DescribePlace(location)
return
}
case 1: GrimPreface
case 2: GrimDesperate
}
}
else { "You need to be carrying your grimoire to reference it." }
}
routine GrimPreface
{
CenterTitle("\BPreface\b")
"\nAt the time I put pen to paper on this"
pause
}
routine GrimDesperate
{
"a"
pause
}[/code]
Somehow, changing "routine DoReadGrimoire" to "replace DoHelp" fixed it. While the help menu logic doesn't [i]seem[/i] sufficient to cover eveything the menu does, I'm also completely lost as to how a replaced help routine is activating the super-secret library codes I need to get things to work right.
Any explanations and/or tricks to getting more than one help-menu style menu in one game? Thanks in advance.