Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: ToxicFrog on April 14, 2021, 09:07:05 AM
-
Hi Playmakers!
Is it possible to create a 'dropdown' variable?
What I want to do is have an 'Input' variable (visible in Inspector), where you can use a dropdown menu to choose between pre-defined game objects.
In this case, I want to choose between Snap Points (Default, Hand, Head, etc). I'd like the choice to be from a pre-defined list of options chosen in a dropdown menu.
Thanks!
*EDIT: Attached mockup of what I want to achieve:
-
Hi.
you could create an enum and inside the fsm you can use the index or enum switch.
and expose the enum
creating a enum script is very simple :
(https://i.imgur.com/zlFlqgD.png)
for the items in an enum you don't have to set index number, but if you want to change the order of your list its good to have these as it might break existing selections (the index is remembered, not the name)
so you can set a NameSpace
and then as many enum lists you need.
there is also a enum wizard in the playmaker top menu, but i prefer to manually do this :)
-
Perfect!
Thanks, djaydino!
This tutorial showed me everything I needed to do this: