Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Andy22 on December 17, 2013, 12:36:50 PM

Title: Help clarify internal differences PlaymakerFSM.BroadcastEvent() vs Fsm.Event()
Post by: Andy22 on December 17, 2013, 12:36:50 PM
Hi,

i just noticed some small logic is missing if "PlaymakerFSM.BroadcastEvent" is used vs the "Fsm.Event()" logic with "EventTarget.BroadcastAll".

At the end inside Fsm.Event() this code is run:
Code: [Select]
      if (FsmExecutionStack.ExecutingFsm == this)
        return;

      FsmExecutionStack.PushFsm(this);
      this.UpdateStateChanges();
      FsmExecutionStack.PopFsm();

In comparison "PlaymakerFSM.BroadcastEvent" does not have this "UpdateStateChanges" related code-block.

Since i try to add a more script+data+timer friendly Fsm.Event() call, i wonder what this code does and if its needed or not, compared to just calling "fsm.ProcessEvent()"?


Thx Andy