Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: DRTIAN on June 17, 2016, 08:35:36 AM

Title: Disabling/Hiding States (I.E. commenting out code)
Post by: DRTIAN on June 17, 2016, 08:35:36 AM
Hey guys I've just started using PlayMaker.

Is there a way to temporarily disable states much like the way you would comment out code which you don't need for the time being with a "//"?

Cheers guys
Title: Re: Disabling/Hiding States (I.E. commenting out code)
Post by: Zeldag on June 17, 2016, 04:17:17 PM
Hi and welcome to the forum!

You can disable the actions in the state, so just disable them all in one particular state and then the state will be basically inactive.

Or otherwise, create an empty state and transition to and from that, or just don't transition to the state you want to disable.

As for actual FSMs they can be enabled and disabled just like any other componenet, in the game object's inspector.

Hope this helps, but what are you trying to achieve anyway?
Title: Re: Disabling/Hiding States (I.E. commenting out code)
Post by: Alex Chouls on June 17, 2016, 08:25:44 PM
Quick Tip: You can ctrl-click an action's enabled checkbox to toggle all actions in the state on/off.
Title: Re: Disabling/Hiding States (I.E. commenting out code)
Post by: DRTIAN on June 18, 2016, 05:18:15 AM
Great, it works, thanks guys.

My purpose was to have test if something worked, but I didn't want the states to be permanently in the game, but still needed them for future reference/maybe implement.
Title: Re: Disabling/Hiding States (I.E. commenting out code)
Post by: djaydino on June 18, 2016, 05:31:06 AM
Hi,
Something i do sometimes is to skip the state and add some information on it

So i just go from state 1 to state 3 and leave state 2 as is.

And remove the transitions on it to get rid of the error but it is not needed,
it will still work.