Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Andy22 on January 09, 2014, 12:44:30 PM
-
Hi,
is there a way to setup a Fsm in a way that u can expose a FsmEvent field to the inspector, so it becomes dynamically changeable per prefab instance, opposed to need copy&paste a FSM per Event used?
I have a simple switch prefab, that normally just sends a "Toggle" event if used, but sometimes i need a specific version that sends "ToggleOn/Off", but i cant find a way to expose a FsmEvent or Enum list to the inspector?
The only way seems to use a string and convert this to the ToggleEnum type, but this again wont help the level designer to understand what events/enum names are valid values. So it could be "on/off" or "Toggle_on".
Thats why we don't use strings as inspector exposed events.
I also had the idea to expose 3 bool's like (toggle, On, Off), then again now u can setup+enable all 3 bools at once, which would be a setup error that is hard to understand.
I guess since PM has no enum support i have to live with one of those options?
thx Andy
-
Hi,
That would be very good indeed.
Currently, I create a test fsm that wrapp this into a convenient way, so I have a specific event and I compose the actul global I want and add the data from the inspector fields of that test Fsm.
Bye,
Jean