playMaker

Author Topic: Generating FSMs through Script  (Read 564 times)

hockeygoalie78

  • Playmaker Newbie
  • *
  • Posts: 8
Generating FSMs through Script
« on: March 17, 2020, 03:42:44 PM »
I am currently attempting to generate an FSM through code, but I'm running into some issues.

I created a simple FSM that starts at state 1 and has a transition event "Test" that transitions it to state 2. However, when I attempt to transition with the code
Code: [Select]
newFSM.Fsm.Event("Test");or
Code: [Select]
newFSM.SendEvent("Test");the FSM does not make any progress and remains in state 1.

If I set up the same FSM manually and run the same code using that FSM, it successfully transitions from state 1 to state 2.

Does anyone know why this might be happening?

Edit: Additional discrepancies I have found are that despite having a transition show up visually in the PlayMaker editor, once the generated FSM starts it no longer detects the transition. Furthermore, the manually created FSM has a green outline on the active state, while the generated FSM does not.
« Last Edit: March 19, 2020, 11:27:21 AM by hockeygoalie78 »