How do I make more than two choices in a dialogue using a menu?

From OHRRPGCE-Wiki
Jump to: navigation, search

I need to make more than two choices for use in dialogues![edit]

It is not currently possible to add a choicebox with more than two choice options to a textbox. However, you can use the Menu system to create a menu and attach it to the textbox instead.

Creating a menu[edit]

Go to "Edit Menus", then create a blank menu. Then, go to "Edit Items" to edit the 'choices' of your dialogue. Make a new item, and make its caption say whatever the choice is. Repeat this process with as many choices you want.

Now, however, this menu does nothing yet. Let's say that you want your choices to turn tags on or off. If this is what you want to do, then you must set the "item type" to Caption (Default) and it's subtype is "Selectable" so that the player can interact with it. Next, below, there is an option called "Set tag <tag> ON/OFF". Here you can edit what tag will be changed when the player selects this choice. If you want the choice to do anything else, try exploring the types. You can also make the caption call a Plotscript when selected (Make sure that the "Allow Gameplay & Plotscripts" is how you want it. This bitset may have dramatic effects on what the plotscript does depending if it is on or off.).

Also, you can make a Caption type item with a subtype "Not selectable" that can act as a 'title' or the usual 'Question' of the choice.

Okay, so I created a menu. But, how do I make it come out?[edit]

You can attach a menu to a text box. In the text box conditionals menu, scroll to the bottom, and choose the menu ID number. Make sure the tag conditional above it is set to something other than "Never"

You can also call the menu using Plotscripting.

Implementing the Menu in your dialogue[edit]

After a text box, you can use the "open menu(menu ID)" plotscripting function. The following example is a good candidate to use Choice in a dialogue with the plotscripting and menus method.

plotscript, example, begin

 show text box (1) # The choice text box. Assume that there are 3 options. Option 1 sets tag 2 on, option 2 sets tag 3 on, etc...
 open menu (1) # Open the menu with your choices.
 
 if (check tag(2)) then (
 
  # Do something if choice 1 was chosen

 )

 if (check tag(3)) then (

  # Do something if choice 2 was chosen 

 )

 if (check tag(4)) then (

  # Do something if choice 3 was chosen

 )

end