playMaker

Author Topic: Mute or deactivate or passtrough State  (Read 3414 times)

pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
Mute or deactivate or passtrough State
« on: December 18, 2017, 03:27:27 PM »
Hi,
Sometime i'd like to "switch off" a state instead of deleting it...
eg :
   - i've got a state, not connected with other state, but with a global transition
           Just making it "inactive" so i can activate it again if i want.
   - i've got a state, connected this time with other states
          Make it "inactive" like a passthrough
So in other words it would be great to be able to test a FSM with or without a state  :-)
Sorry if it does exist already and i don't know ...
Thanks

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Mute or deactivate or passtrough State
« Reply #1 on: December 18, 2017, 04:49:54 PM »
Great idea, we definitely need more such things for workflow.
Available for Playmaker work

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Mute or deactivate or passtrough State
« Reply #2 on: December 18, 2017, 05:33:02 PM »
Hi,
I usually use bools to 'skip' a state when needed
and globals to idle or activate parts in the fsm.

similar as i would in code like a
Code: [Select]
if(bool = true) do thisis if the bool is false it will be skipped.

But i understand what you are saying.
I think it is not easy to implement the ability to 'turn off' states.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Mute or deactivate or passtrough State
« Reply #3 on: December 19, 2017, 02:24:26 AM »
Why not, i think the state would only need to be visually represented different, something like this



And then the playmaker itself can disable all actions in the state and put next frame event/finished state. When you turn it off, it deletes it and enables everything else in the state.
Available for Playmaker work

pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
Re: Mute or deactivate or passtrough State
« Reply #4 on: December 19, 2017, 04:30:33 PM »
I'm glad to read all your inputs :-)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mute or deactivate or passtrough State
« Reply #5 on: December 20, 2017, 01:42:58 AM »
Hi,
 
 I agree it would be very convenient.

 Bye,
 
 Jean

pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
Re: Mute or deactivate or passtrough State
« Reply #6 on: December 20, 2017, 12:17:41 PM »
I'm so proud Jean agrees with me !

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Mute or deactivate or passtrough State
« Reply #7 on: December 20, 2017, 04:37:57 PM »
Hi.
@krmko
Visually it is easy to do so, but in coding i think its not that easy to implement, especially when you can enable/disable @runtime.

And i also do think that it is a good idea :)


Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Mute or deactivate or passtrough State
« Reply #8 on: December 20, 2017, 07:40:55 PM »
The question is what state to transition to instead, if a state is disabled? Maybe just send the FINISHED event? So you can handle it however you want...?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Mute or deactivate or passtrough State
« Reply #9 on: December 21, 2017, 04:04:48 AM »
Hi.
Indeed, if there are multiple transitions, there needs to be a logic on how to continue.

If disabled by an action, you could define the transition to go to.
If there was no transition defined do FINISHED event
If there is no FINISHED event and no transition defined, do nothing.

On the last one i was thinking maybe to send the top transition but i do think it is better to do nothing so that you need to define a transition.
Maybe it can trigger an error event.