playMaker

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

Igmon

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
enum flags and FsmLayerMask?
« on: January 31, 2013, 08: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: 14684
  • Official Playmaker Support
    • View Profile
Re: enum flags and FsmLayerMask?
« Reply #1 on: February 07, 2013, 11:43:35 PM »
Hi,

you mean storing enum and layermask in variables right?


bye,

 Jean

kkaul

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: enum flags and FsmLayerMask?
« Reply #2 on: September 25, 2014, 08: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: 14684
  • Official Playmaker Support
    • View Profile
Re: enum flags and FsmLayerMask?
« Reply #3 on: September 29, 2014, 08: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
    • View Profile
Re: enum flags and FsmLayerMask?
« Reply #4 on: January 01, 2015, 02:05:13 AM »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: enum flags and FsmLayerMask?
« Reply #5 on: January 18, 2015, 11:05:11 PM »
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
    • View Profile
Re: enum flags and FsmLayerMask?
« Reply #6 on: June 29, 2018, 09:39:20 PM »
Was the flags/bitmask feature ever added for enums?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: enum flags and FsmLayerMask?
« Reply #7 on: July 02, 2018, 12: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