playMaker

Author Topic: Enable/Disable other actions  (Read 5028 times)

damdai

  • Playmaker Newbie
  • *
  • Posts: 5
Enable/Disable other actions
« on: September 12, 2013, 10:30:48 AM »
Would it be possible to create an action to enable or disable other actions?

Saputo

  • Full Member
  • ***
  • Posts: 107
Re: Enable/Disable other actions
« Reply #1 on: September 12, 2013, 08:22:46 PM »
The Enable FSM Action is what you are looking for, it's under StateMachine.

damdai

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Enable/Disable other actions
« Reply #2 on: September 13, 2013, 10:41:20 AM »
Doesn't exist. There's "Enable FSM", but not "Enable FSM Action." I'm updated to latest version. Perhaps that's a custom action?
« Last Edit: September 13, 2013, 10:43:46 AM by damdai »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: Enable/Disable other actions
« Reply #3 on: September 13, 2013, 11:07:07 AM »
There's no Enable Action action... I'm worried that it would make it very hard to follow execution flow. If you need to turn off individual actions, they should probably be their own states, or even FSMs. Trying to do too much in one FSM can make it hard to follow and maintain.

Do you have an example showing how you would use it?

damdai

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Enable/Disable other actions
« Reply #4 on: September 13, 2013, 02:19:54 PM »
Essentially, it is a walk state with a "Controller Move" action. I wanted to add a Raycast action within the state that would check if the player was about to walk off an edge, and if so, disable/enable the "Controller Move" action accordingly. The concept is working through scripting, but it would be nice to remain within PlayMaker.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Enable/Disable other actions
« Reply #5 on: September 16, 2013, 02:03:32 AM »
Hi,

 To achieve this, simply have two fsm, one with the controller and one checking for enabling/disabling the fsm responsible for the controller.

Does that make sense?

bye,

 Jean