Playmaker Forum

PlayMaker Feedback => Feature Requests => Topic started by: pietwelve on December 18, 2017, 03:27:27 PM

Title: Mute or deactivate or passtrough State
Post by: pietwelve 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
Title: Re: Mute or deactivate or passtrough State
Post by: Fat Pug Studio on December 18, 2017, 04:49:54 PM
Great idea, we definitely need more such things for workflow.
Title: Re: Mute or deactivate or passtrough State
Post by: djaydino 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.
Title: Re: Mute or deactivate or passtrough State
Post by: Fat Pug Studio 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

(https://s7.postimg.org/b8qpog27v/Play_Maker_States2.png)

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.
Title: Re: Mute or deactivate or passtrough State
Post by: pietwelve on December 19, 2017, 04:30:33 PM
I'm glad to read all your inputs :-)
Title: Re: Mute or deactivate or passtrough State
Post by: jeanfabre on December 20, 2017, 01:42:58 AM
Hi,
 
 I agree it would be very convenient.

 Bye,
 
 Jean
Title: Re: Mute or deactivate or passtrough State
Post by: pietwelve on December 20, 2017, 12:17:41 PM
I'm so proud Jean agrees with me !
Title: Re: Mute or deactivate or passtrough State
Post by: djaydino 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 :)

Title: Re: Mute or deactivate or passtrough State
Post by: Alex Chouls 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...?
Title: Re: Mute or deactivate or passtrough State
Post by: djaydino 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.