Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: masterprompt on March 25, 2013, 06:19:21 PM

Title: This package is just too frustrating....
Post by: masterprompt on March 25, 2013, 06:19:21 PM
I'm sending the state machine an event, i know i am, im debugging the string just before i send it to the darn state machine.... and the statemachine is acting like it never got it.....  Are there any known issues with events in playmaker? 

I just want to tear my hair out...  I've been programming for over 20 years, and nothing has been as frustrating as this...
Title: Re: This package is just too frustrating....
Post by: masterprompt on March 25, 2013, 06:21:54 PM
Here is how im linking up the state machine to a script:
Code: [Select]
public PlayMakerFSM roomLogic = null;
        public string logicActiveEvent = "Activate";
        public string logicInactiveEvent = "Inactive";

And down, where i want to send the event, is this:
Code: [Select]
string thisEventName = (Active == this ? logicActiveEvent : logicInactiveEvent);
            Debug.Log("Event:" + thisEventName, this);
            Debug.Log("roomLogic:" + roomLogic, roomLogic);
            roomLogic.SendEvent(thisEventName);

I'm seeing the "Activate" come up in the console.  I look over at the state machine and it's still in it's starting state as if it never got the event.....
Title: Re: This package is just too frustrating....
Post by: Alex Chouls on March 25, 2013, 09:31:35 PM
If you open the FSM Log window you can see the events that an FSM receives.

I just tested SendEvent here and everything seems to be working fine...

Is the FSM in a state that responds to the event?

The active state runs actions and process events. If you want the FSM to respond to an event in any state use a global transition (right click state "Add Global Transition").