Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

What is "Selection Type" from Combo Box OnSelectionChanged node?

Made a combo box that is almost functional, but I am not seeing the output I expected from the "Selection Type" output on the OnSelectionChanged node. It is giving me 2 every time. even with a drop down that only has 2 items. I was hoping that it the first item in the list would be 0, the second 1, and so on but that either isn't the case or I am running into a bug.

I would prefer not to use the Selected Item as that would force me to make the code more bloated than would be the case if I were getting an index of the selection of the dropdown. Any help would be appreciated!

Product Version: UE 4.10
more ▼

asked Jan 30 '16 at 10:01 AM in Blueprint Scripting

avatar image

1.8k 131 68 110

avatar image ScottSpadea Jan 30 '16 at 06:22 PM

if this is something the player sees in game, i recommend you roll your own combo box widget. its pretty easy to make a menu by adding custom widgets as a child of a vertical box, and you get a lot more freedom to customize things, like adding icons or separator lines or special rollover effects or greyed out choices.

avatar image Zeustiak Jan 31 '16 at 01:35 AM

You can already add widgets to the combo box, which should give the same level of control right?

avatar image ScottSpadea Jan 31 '16 at 03:37 AM

i didn't know that. i haven't played with the standard combo boxes much, because one of the first things i made in UE4 was a generic menu system that i use for any list of ui cards, and drop down functionality was designed into it. I also made my own sliders and power meters, just in case i need more control than the standard widgets.

avatar image Zeustiak Jan 31 '16 at 04:18 AM

Yeah, it isn't obvious that you can do it. Only found out by reading a post by Nick Darnell where he showed how you can do it. There are a couple other posts around that also point in that direction.

For the above issue, I basically made a work around by doing a complicated branch check on all the string names I could expect, but it is less elegant than if the "Selection Type" output of the node gave the expected index of the dropdown. It only gives a value of 2, no matter which selection you make or however many selections are in the dropdown.

avatar image Zeustiak Feb 07 '16 at 12:19 AM

Any dev able to comment on this node?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

The Selection Type output pin outputs what type of input was used to make the selection. For example if you use a mouse and selects the option using a mouse click it will output "On Mouse Click".

more ▼

answered Mar 15 '17 at 07:56 AM

avatar image

1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Unfortunately you have to use SelectedItem (String). It's the only way Unreal communicates to you what item was selected. SelectionType can not be used, it just tells you if a mouse cursor or keyboard was used to make the selection.

However you can still turn the String into an index like you want, by calling:


more ▼

answered Jul 10 '17 at 10:30 AM

avatar image

51 1 4 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question