Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: bjarnidk on October 12, 2018, 07:45:59 AM

Title: Get dropdown value - How to work from there?
Post by: bjarnidk on October 12, 2018, 07:45:59 AM
So I've got a UI with a dropdown menu. I want to display a different image on the screen depending on which option is selected.

I've tried figuring out how to do this in playmaker but need a nudge, please!
Title: Re: Get dropdown value - How to work from there?
Post by: bjarnidk on October 12, 2018, 08:16:32 AM
I figured it out using the "Int Switch" method. I do have a followup question that I don't know if can be solved.

I want a dropdown menu that you can select several options in (so ticks inside dropdown) and unity doesn't seem to support this so I got an asset for it on the store: https://assetstore.unity.com/packages/tools/gui/multi-selection-dropdown-gui-component-85255

However, is there any way I can work with this asset and playmaker to display 1-5 different images depending on which the user chose?
Title: Re: Get dropdown value - How to work from there?
Post by: djaydino on October 13, 2018, 02:46:43 PM
Hi.
A dedicated dropdown would not work but you could make your own with a bunch of buttons.

When the main button click animate the dropdown (a group of buttons with a set scale or something)
then these buttons can be 'toggled' when using a bool switch.Properties.
I am traveling at the moment, but bump this thread on Monday if you did not find a solution yet.

For the asset you could try the Get/Set properties, but it would be better to have dedicated actions for it.

I do not own the assets else i could have a look to make actions for it.
Title: Re: Get dropdown value - How to work from there?
Post by: bjarnidk on October 15, 2018, 07:50:43 AM
When I do a Dropdown Get action on the asset, it just says "needs to be a dropdown menu", which it technically is, but modded.

I still can't seem to solve it.

What I want is a dropdown menu where you can select several options and playmaker displays/identifies all the options selected.
Title: Re: Get dropdown value - How to work from there?
Post by: jeanfabre on October 18, 2018, 04:08:48 AM
Hi,

 You should store your data into an array, and when the user has selected an item in your dropdown, you use the index to find out what you need to show.

 Are you struggling to get the Id of the selected dropdown Item or what to do with it after?

 Bye,

 Jean