Quotations in Menus?

Shadecerule

Is there a way to show quotations for menus?

In my interactive, there are a lot of instances where the player has to respond to people. I use menus for this because I don't want them to be able to avoid these choices, and I don't use commands because I don't want them to be able to reselect these particular choices. However, I want a lot of these choices to be spoken responses to add more flavor than "tell him [thing]," but menus don't seem to work when quotations are used. Avoiding quotations altogether is out of the question because sometimes I want the menus to display BOTH dialogue and actions.

Is there a workaround for this, or is this just functionality that Quest doesn't support?


XanMag

I'm sure someone wiser than I will come along with a solution, but...

You could always use a "home made" menu using a print message (your question), get input, switch scripts with a default response that recycles the question. Just a thought. If there isn't a solution that works for you and you want to go this route, let me know.


Shadecerule

I was thinking of using something like that, but it has a few problems:

  • How do I prevent the player from doing anything before they pick an answer?
  • Is there a way for me to make the choices display as links so that the player doesn't have to redundantly type out responses? (This menu would be a very common experience for the user.)

XanMag

The first part is easy. Your default response just runs the function again.

Example: I have a function called 'computer loop' which is a get input, switch script. If anything is entered that is not listed as a case, I simply call the function 'computer loop' again. It is impossible for the player to proceed before inputting an accepted response.

The second part is a little bit tougher for me to answer because the games I've made are all old school - where the player has to type everything. I'm SURE that what you are asking is doable and probably not too hard. Certainly someone will be along soon that can answer this second part. You could have the possible menu selections numbered.

What would you like to do?
1.  Say "Hello" to him.
2.  Punch him in the face.
3.  Give him a dollar.
4.  etc...

And the player would just have to type a number and enter. Just a thought. Before proceeding, I would wait on someone with more using menu experience. I'm pretty sure there is an easier, more aesthetic way. Good luck!


The Pixie

I have yet to find a way to have either ' and " in a ShowMenu option. You could try the show menu command; I am not sure if that works the same, but I would guess not.


hegemonkhan

if the 'escape' character doesn't work (and if/since Pixie doesn't know how), then you just have to manually create your own menu.

the escape character (at least it works in the 'msg' Script, can be used to print/display your double quote) put these ENCLOSED WITHIN your quote marks:

\"

so, for example:

msg ("\"Take out the trash!\", commanded your mother, shoutingly.")
// outputs: "Take out the trash!", commanded your mother, shoutingly.

the single quote character, doesn't require the escape character, quest parses this as it's own character (it's not used for any other coding, so it directl works as a character, just like the 'a' does), but you can use the escape character anyways for it too:

\'

to manually create your own menu, an example:

// example of using ("calling") the Function:

displayed_quotes_string_variable = "\"Select an option from the menu\", says the magical voice."
custom_menu_function (displayed_quotes_string_variable, game.my_menu)

// ----------

<function name="custom_menu_function" parameters="prompt_string_parameter;stringlist_attribute_parameter">
  ClearScreen
  msg (prompt_string_parameter)
  // optional: msg ("0. random")
  numbering_integer_variable = 0
  foreach (string_variable; stringlist_attribute_parameter) {
    numbering_integer_variable = numbering_integer_variable + 1
    msg (numbering_integer_variable + ". " + string_variable)
  }
  /*
  // if you want a way of handling it:
  get input {
    ClearScreen
    if (ToInt (result) = 0) {
      selected_menu_string_variable = StringListItem (stringlist_attribute_parameter, GetRandomInt (0, ListCount (stringlist_attribute_parameter) - 1)) 
    } else if (IsInt (result) and ToInt (result) > 0 and ToInt (result) <= ListCount (stringlist_attribute_parameter)) {
      selected_menu_string_variable = StringListItem (stringlist_attribute_parameter, ToInt (result) - 1))
    } else {
      custom_menu_function (prompt_string_parameter,stringlist_attribute_parameter)
    }
    // your scripting using 'selected_menu_string_variable' (ask if you need help)
  }
  */
</function>

ask if you got any questions and/or need help with anything


Shadecerule

Thank you! I'll have to look into this.


Log in to post a reply.

Support

Forums