playMaker

Author Topic: This package is just too frustrating....  (Read 1343 times)

masterprompt

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
This package is just too frustrating....
« 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...

masterprompt

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Re: This package is just too frustrating....
« Reply #1 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.....
« Last Edit: March 25, 2013, 06:29:15 PM by masterprompt »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3905
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: This package is just too frustrating....
« Reply #2 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").