playMaker

Author Topic: enum flags and FsmLayerMask?  (Read 4820 times)

Igmon

  • Playmaker Newbie
  • *
  • Posts: 5
enum flags and FsmLayerMask?
« on: January 31, 2013, 10:47:43 PM »
I don't know if it's been requested or is in your TODO list, but would be nice to have these features:

Currently you can add a dropdown field for enums for an action, any chance we can have a way to declare a field as an enum flag? Sort of like how we can customize an enum as flags in the inspector by creating a customized class inspector. 

Also, LayerMask would be handy.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: enum flags and FsmLayerMask?
« Reply #1 on: February 08, 2013, 01:43:35 AM »
Hi,

you mean storing enum and layermask in variables right?


bye,

 Jean

kkaul

  • Playmaker Newbie
  • *
  • Posts: 2
Re: enum flags and FsmLayerMask?
« Reply #2 on: September 25, 2014, 11:30:15 AM »
Yes support for enum flags like this storing in a variable

Code: [Select]
[Flags]
enum EnumFlagTest{
    Something1,
    Something2,
    Something3,...
}

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: enum flags and FsmLayerMask?
« Reply #3 on: September 29, 2014, 11:07:50 AM »
Hi,

 FsmEnum is coming with the next version of PlayMaker currently in beta. I am not too sure what [Flags] means in your example tho.

 Bye,

 Jean

cybervaldez

  • Playmaker Newbie
  • *
  • Posts: 7
Re: enum flags and FsmLayerMask?
« Reply #4 on: January 01, 2015, 04:05:13 AM »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: enum flags and FsmLayerMask?
« Reply #5 on: January 19, 2015, 01:05:11 AM »
Hi,

 That's a very good case.

 This would still fall into what's coming next with 1.8, that is FsmEnum.

Creating enum will remain a job to be done by you. I am tinkering with the idea of creating a visual wizard that would create enum scripts for you. I could take this into consideration to create flag ready enums

Some custom actions will be necessary with custom visual interface to work with enums this way. But I don't see why it would not be possible.

 However, I think that as is, with regular enums, we can still create an action ( or even do it with pur fsm), that would do a check on several enum values and the action would return true if the variable is equal to one of them values.

Bye,

 Jean

Guavaman

  • Playmaker Newbie
  • *
  • Posts: 38
Re: enum flags and FsmLayerMask?
« Reply #6 on: June 30, 2018, 12:39:20 AM »
Was the flags/bitmask feature ever added for enums?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: enum flags and FsmLayerMask?
« Reply #7 on: July 02, 2018, 03:26:58 AM »
Hi,

 Nop, Enum Flags is not yet an option inside PlayMaker. Let me bump this to Alex, maybe we could have this for the current 1.9.1 beta cycle that's coming soon.

 Bye,

 Jean