playMaker

Author Topic: FSM.Event(myEvent) not firing  (Read 1033 times)

codemonkey2k

  • Playmaker Newbie
  • *
  • Posts: 1
FSM.Event(myEvent) not firing
« on: August 31, 2018, 06:37:43 PM »
I am a long time programmer fairly new to game dev and unity, so I bought PlayMaker and quickly realized that while it is super powerful if I can write my own custom Actions I can do a lot more. So currently I am working on several Array List actions that I am trying to add an OnChange event too. In my class I have a "public FsmEvent arrayChangedEvent;" variable and I sign it a value in the PlayMaker editor on the state. However the event never fires. I have attempted to debug the script and for some reason when I call "Fsm.Event(arrayChangedEvent);" when I detect a change the arrayChangedEvent variable is null (according to Visual Studio). I know all of the other logic is working because my array is updating and I can see it changing Unity Inspector and in the PlayMaker editor, I have also done a debug log to the Unity Console to make sure the logic is firing when it should and that appears to be working as well. So my only issue seems to be the FsmEvent variable being null? The other variables in my Action appear to be working fine and the only place I reference the FsmEvent variable other than where it is declared and where the event is triggered is in the Reset() subroutine.

Any thoughts or suggestions? I have tried debugging in PlayMaker using breakpoints and in Visual Studio and I cannot figure out why this variable is null when it should contain a value.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: FSM.Event(myEvent) not firing
« Reply #1 on: September 01, 2018, 11:38:42 PM »
Hi.
Can you show the scrip?