playMaker

Author Topic: Disabling/Hiding States (I.E. commenting out code)  (Read 1717 times)

DRTIAN

  • Playmaker Newbie
  • *
  • Posts: 2
Disabling/Hiding States (I.E. commenting out code)
« 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

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: Disabling/Hiding States (I.E. commenting out code)
« Reply #1 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?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: Disabling/Hiding States (I.E. commenting out code)
« Reply #2 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.

DRTIAN

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Disabling/Hiding States (I.E. commenting out code)
« Reply #3 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.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Disabling/Hiding States (I.E. commenting out code)
« Reply #4 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.