Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ATeshGames on December 12, 2017, 12:34:37 PM

Title: [SOLVED] Custom action that can take either string or int but not both
Post by: ATeshGames on December 12, 2017, 12:34:37 PM
I'm integrating my asset that changes scenes/levels with PlayMaker and ideally I'd like to allow people to choose between loading a scene by name or by number. Is there a way in the PlayMaker action UI to show one or the other but not both? If not I can follow how level change actions are currently done and make separate actions for them but I was hoping to not have to :)
Thanks!
Title: Re: Custom action that can take either string or int but not both
Post by: djaydino on December 12, 2017, 04:47:04 PM
Hi,
how are you showing them (or how do you want to show them) ?
and how do they (or should they) change to name or number?

If you want to display numbers they still need to be converted as string.
Title: Re: Custom action that can take either string or int but not both
Post by: ATeshGames on December 13, 2017, 09:30:35 AM
I'm currently showing them using and FsmString and FsmInt and it looks like this:
https://imgur.com/56IjgCF
Ideally it would have some way to toggle between using name and number to load a level like this:
https://imgur.com/5m9lBOI
https://imgur.com/2Fh97k4
Title: Re: Custom action that can take either string or int but not both
Post by: djaydino on December 13, 2017, 10:21:29 AM
Hi.
So you are making custom actions for your asset?

If so i would make 1 for number (index) and one for string, not combine them into 1 action.

Title: Re: Custom action that can take either string or int but not both
Post by: ATeshGames on December 13, 2017, 10:27:22 AM
Yep! Alright I'll do that thanks for the help :)
Title: Re: Custom action that can take either string or int but not both
Post by: djaydino on December 13, 2017, 12:03:27 PM
Hi.
No problem, if you want me to check your actions you can pm me.
Title: Re: Custom action that can take either string or int but not both
Post by: ATeshGames on December 15, 2017, 10:25:44 AM
Thanks for the offer! I bought the package and made some example projects to test and it seemed to work well.