playMaker

Author Topic: Set Variable type in custom actions  (Read 2923 times)

DARK_ETERNAL

  • Full Member
  • ***
  • Posts: 110
Set Variable type in custom actions
« on: October 31, 2012, 04:59:31 PM »
Greetings.

In the integration with EZGUI I'm working, I want to set a Button's Data property. The problem is... Data might receive objects from ANY data type. I started defining a custom action to set a specific data type value to this property, but it might be pretty wasteful to do it to basic data types, so, I was wondering if there is any way to get to Fsm variable types, as an enum or something like that, so I can easily define a data type in a single custom action. Custom types, however, might require some work from myself.

Thanks in advance.
Check out our new game: Nitro Chimp. Now live in App Store!

Trailer:
Download: https://itunes.apple.com/app/nitro-chimp/id557150450?l=en&mt=8

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Set Variable type in custom actions
« Reply #1 on: November 01, 2012, 01:47:16 AM »
Hi,

 Simply define that enum yourself, I did that quite a bit, especially when for some features, some Fsm Variable do not apply, so you need only a sub set of the fsm variables to pick from.

 ArrayMaker is using this technic to let the user pick what variable type he wants to deal with for a given setter or getter within arrays.

bye,

 Jean

DARK_ETERNAL

  • Full Member
  • ***
  • Posts: 110
Re: Set Variable type in custom actions
« Reply #2 on: November 01, 2012, 09:50:11 AM »
OK. I'll take a look.

Thanks for your reply.
Check out our new game: Nitro Chimp. Now live in App Store!

Trailer:
Download: https://itunes.apple.com/app/nitro-chimp/id557150450?l=en&mt=8