playMaker

Author Topic: [SOLVED] Custom action that can take either string or int but not both  (Read 1642 times)

ATeshGames

  • Playmaker Newbie
  • *
  • Posts: 12
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!
« Last Edit: December 15, 2017, 10:25:56 AM by ATeshGames »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Custom action that can take either string or int but not both
« Reply #1 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.

ATeshGames

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Custom action that can take either string or int but not both
« Reply #2 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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Custom action that can take either string or int but not both
« Reply #3 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.


ATeshGames

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Custom action that can take either string or int but not both
« Reply #4 on: December 13, 2017, 10:27:22 AM »
Yep! Alright I'll do that thanks for the help :)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Custom action that can take either string or int but not both
« Reply #5 on: December 13, 2017, 12:03:27 PM »
Hi.
No problem, if you want me to check your actions you can pm me.

ATeshGames

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Custom action that can take either string or int but not both
« Reply #6 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.