I have been searching for how to use a listbox in my dialog but all I can find is a very long tutorial on a different kind of listbox I don't want. I just want the simple dialog list box in the editor. I created a listbox that drops down with four options. I have a variable and parameter for each of the options. Here is an example of the trigger on one:
Offensive
Events
Dialog - (Offensive()) is used by Player Any Player with event type Changed Selection
Local Variables
Conditions
Actions
UI - Display "Offensive working" for (All players) to Subtitle area
selection
I have four of these triggers and whenever I test in map it shows all four triggering at same time with selection of any of them. So if I go in and select "Offensive" I get the messages:
"Offensive working"
"Recover working"
"Assist working"
"Other working"
I had tried it that way before (tried again copying your exact trigger to be sure) and same thing. When I do it that way it only shows one text, but its always the first option. No matter what dialog item on the pulldown I click on it says "Offensive working" and that's it.
Ah, there's your problem. List items are not dialog items. They cannot be set to variables. You need to set the Used Dialog Item to PSIPulldown. When determining actions, use Selected List Item for PSIPulldown. 0 is no selection, 1 is Offensive, 2 is Recover, etc. (The order that the list items are created in is their respective number in the pulldown.)
I have been searching for how to use a listbox in my dialog but all I can find is a very long tutorial on a different kind of listbox I don't want. I just want the simple dialog list box in the editor. I created a listbox that drops down with four options. I have a variable and parameter for each of the options. Here is an example of the trigger on one: Offensive Events Dialog - (Offensive()) is used by Player Any Player with event type Changed Selection Local Variables Conditions Actions UI - Display "Offensive working" for (All players) to Subtitle area selection I have four of these triggers and whenever I test in map it shows all four triggering at same time with selection of any of them. So if I go in and select "Offensive" I get the messages: "Offensive working" "Recover working" "Assist working" "Other working"
Make your event "Any dialog item is used by Player Any Player with..."
Under actions, create a switch action which depends on Used Dialog Item.
For example:
I had tried it that way before (tried again copying your exact trigger to be sure) and same thing. When I do it that way it only shows one text, but its always the first option. No matter what dialog item on the pulldown I click on it says "Offensive working" and that's it.
Make sure your dialog options are set to the proper variables.
This is the trigger that builds it, I'm a noob so probably not seeing what I'm doing wrong:
Ah, there's your problem. List items are not dialog items. They cannot be set to variables. You need to set the Used Dialog Item to PSIPulldown. When determining actions, use Selected List Item for PSIPulldown. 0 is no selection, 1 is Offensive, 2 is Recover, etc. (The order that the list items are created in is their respective number in the pulldown.)
Thanks that worked perfect.