Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started 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...
-
Here is how im linking up the state machine to a script:
public PlayMakerFSM roomLogic = null;
public string logicActiveEvent = "Activate";
public string logicInactiveEvent = "Inactive";
And down, where i want to send the event, is this:
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.....
-
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").