SOLVED 'Show object hyperlink'

the anamneser
15 Oct 2017, 08:07

Some objects my character gets, should be used immediately. Now, the player must go to the inventory and use the hyperlink there to use it. I want it to be more spontaneous by showing it in the output/ game text, with a hyperlink.
So far, i have tried things from this page, http://docs.textadventures.co.uk/quest/guides/hyperlinks.html . But no results in the right direction (i am new to Quest and I don't know what to put where. )
Thank you.


The Pixie
15 Oct 2017, 09:18

It should do that by default. You have to turn them off if you do not want them. That page is very old, it says what is expected in Quest 5.3, and we are now on Quest 5.7, so it may not be much use.

Go to the Display tab of the game object, and check that the Hyperlinks box is ticked.


the anamneser
12 Dec 2017, 18:14

Thank you, but it does not work for me. I will clarify my situation.
I want to make a hyperlink based conversation on the web version.

Example: player is a client in a restaurant, he talks to the waiter in a restaurant -

there are some options when clicking on the hyperlink of the client: for example 'ask for the specials' and 'ask if he wants to see the menu'.

  • When clicking the menu option, I want it to say:

"Can i see the menu?"
"Here you are"
The waiter gives you the menu

  • The last sentence should be printed with menu as a hyperlink, which you can click and choose different options from, like 'choose steak', choose salad', 'choose fish'...

  • For now, my hyperlink box in the game 'Display' tag is ticked, i have tried 'You get a {object:menu}' in the print message, but it does not work for me. I also have ticked off: 'display commands entered by the player, because i think this slows the game down.

=> Can someone help me to do this please? I think there should be an easy way to do this, but i can't find
one.


K.V.
12 Dec 2017, 18:19

What is the menu object's actual name? (Caps count.)

If it's Menu rather than menu, you'd need to put {object:Menu}.


the anamneser
12 Dec 2017, 18:27

Thank you!


K.V.
12 Dec 2017, 18:35

I would set up a SPEAK verb on the waiter, with a ShowMenu function in the script, like this:

image


NOTE: My menu object is named menu.


Here's the script in text form, so you can copy, paste, and alter, if you wish.

ShowMenu ("\"What the heck do <i>you</i> want?!?\" the waiter rudely asks.", Split("Ask about the specials.;Ask to see the menu.", ";"), true) {
  switch (result) {
    case ("Ask about the specials.") {
      msg ("\"Try the lasagna,\" says the waiter.")
    }
    case ("Ask to see the menu.") {
      msg ("You ask for the menu.<br/><br/>\"Here is the {object:menu}, sir,\" says the waiter, handing it to you.")
      AddToInventory (menu)
    }
  }
}

image


image


image