playMaker

Author Topic: Set Enum value via string/index?  (Read 45 times)

craigz

  • Junior Playmaker
  • **
  • Posts: 84
    • View Profile
    • Haven Made
Set Enum value via string/index?
« on: February 12, 2018, 08:10:19 AM »
Wasn't sure if there currently was a way to do this or not...

I'm looking for a way to save current enum values, and best I can find to do is save the index/int for the enum. But then I realized there's no way to actually SET an enum by any value other than an enum.

Could have an int-switch tied to set-enum but that seems like a bit of a workaround. *shrugs* just wasn't sure if there was a better way?

best,

craigz

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12671
  • Official Playmaker Support
    • View Profile
Re: Set Enum value via string/index?
« Reply #1 on: February 19, 2018, 11:46:19 PM »
Hi,

 Good point. Made an action for this on the Ecosystem. Search for "ConvertIntToEnum"



 bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12671
  • Official Playmaker Support
    • View Profile
Re: Set Enum value via string/index?
« Reply #2 on: February 19, 2018, 11:53:58 PM »
Hi,

 and the second one: ConvertStringToEnum



 Bye,

 Jean