Not sure if this shuld be posted here or under Playmaker Bugs, nut let's see if we can figure this out.
I have a goblin that will chase a chicken when it comes within range. The goblin fires off a SendEvent action that is received by the chicken who uses the GetEventInfo action to find out which goblin it should run away from.
This all works ok when the chicken listens for the event in a single FSM, but it doesn't work when the chicken listens for the event inside a sub-FSM. The sub-FSM still receives the event, but the event source is now the chicken itself.
What's really weird is that the sub-FSM "sometimes" gets the correct goblin event source when I enable a breakpoint on the chicken state receiving the event. I haven't been able to figure out why or when this occurs.
FYI:
I use a custom event called "GoblinChase" that is marked as global in all FSMs.
The goblin's SendEvent action has EventTarget=GameObjectFSM with GameObject=Chicken (FSM variable in goblin) Delay=0 EveryFrame=false
When debug-logging Fsm.EventData.SentByState inside GetEventInfo, I saw that the sub-FSM got its event from the host-FSM instead of the goblin. Strangely, Fsm.EventData.SentByGameObject seemed to be null.
Is this the intended behaviour? If so, how can I get the "true" source of the event when using nested FSMs?
Thanks!