playMaker

Author Topic: Is it possible to reset or stop a running FSM (Run FSM)?  (Read 2695 times)

Grofit

  • Junior Playmaker
  • **
  • Posts: 73
Is it possible to reset or stop a running FSM (Run FSM)?
« on: March 26, 2014, 03:40:06 PM »
Currently have a situation where I want to start following an entity which kickstarts a child script to do the following while it continues on doing its other logic, then on an interval or some specific status changes it needs to then go and reset the child FSM as it is no longer going to be heading in the right direction.

So for example if the target moves, or I need it to target a different entity the child FSM needs to stop/reset and be run again. Now I can find Run FSM and have stored the ID for it, but there seems to be no way to stop the running FSM or reset it back to default.

Am I missing something or can I not achieve this currently?

Grofit

  • Junior Playmaker
  • **
  • Posts: 73
Re: Is it possible to reset or stop a running FSM (Run FSM)?
« Reply #1 on: April 01, 2014, 08:57:40 AM »
Bump on this... anyone know if it is possible?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Is it possible to reset or stop a running FSM (Run FSM)?
« Reply #2 on: April 01, 2014, 09:59:26 AM »
Why not just send a global event that goes back to the Start state when you want it to run again?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Grofit

  • Junior Playmaker
  • **
  • Posts: 73
Re: Is it possible to reset or stop a running FSM (Run FSM)?
« Reply #3 on: April 01, 2014, 01:34:11 PM »
Just seems a bit overkill, I guess if I send a targetted even to the single FSM which would stop it.

It just seems a logical thing if you can start an FSM you can end and FSM, the only reason I ask is that I have a some templates which are used as first class states in a lot of places, however in this case I would want to use that but just as a partial behaviour of a larger behaviour so dont want to have to change the template much as then it would effect everything else.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Is it possible to reset or stop a running FSM (Run FSM)?
« Reply #4 on: April 02, 2014, 07:25:14 AM »
Hi,

 exiting and reentering the state should do what you are looking for, have you tried?

bye,

 Jean