This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.
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.
Debaser wrote:Oddly, when I tried to steal the help menu code for use in the table of contents in a book, it didn't work.
[...]
Somehow, changing "routine DoReadGrimoire" to "replace DoHelp" fixed it.
What does "it didn't work" mean here? Because that's kind of weird.
The menu comes up, but selecting an option doesn't actually do anything. The screen stays static and doesn't activate the option. Robb reports memories of similar problems back when he was coding ACS, and he was the one who suggested switching the routine back to help.
Um... nevermind. I guess, somehow, in the process of cutting out the requisite bits of code into a shell for you to look at, I fixed whatever problem I was experiencing. Haven't the faintest clue what I did. Odd that, but I guess I shouldn't look gift code in the mouth. Thanks anyway.