playMaker

Author Topic: Why Fsm.Event(fsmEventName) may not work?  (Read 998 times)

Deadcow

  • Playmaker Newbie
  • *
  • Posts: 2
Why Fsm.Event(fsmEventName) may not work?
« on: December 13, 2017, 02:59:12 AM »
Hello. I've got such construction:


Interactive state have InteractiveAction action, in that action I've got function like this
Code: [Select]
public void Interact()
{
Debug.Log("ON INTERACTED");
Fsm.Event("Interacted");
}

In OpenShopAction state I have, well, OpenShopAction with
Code: [Select]
public override void OnEnter()
{
Debug.Log("CREATE SHOP UI ON ENTER");
//...
}

During playmode this Interact method invoked (not on game start), but transition not happening. I've got "ON INTERACTED" message, but "ON ENTER" isn't there. And in PlayMakerEditor transition is not visually appeared too.

This contruction worked before and several times I've got situation, when this transition is not working, but then I restart Unity and all fine. Now I completely broke it somehow, apparently :)
I'm experimenting with custom actions and maybe broke something. Do you aware of some conditions when Fsm.Event may not work or other conditions that may prevent event transitions?
Or, may be OnEnter is not called for some reason AND transition is not visualized in Editor?
« Last Edit: December 13, 2017, 03:02:44 AM by Deadcow »

Deadcow

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Why Fsm.Event(fsmEventName) may not work?
« Reply #1 on: December 14, 2017, 04:22:22 AM »
Aaaand... it's working again) My best thought that it's somewhat execution order related problem. Any thoughts on where to look at?