playMaker

Author Topic: FSM play out of order.  (Read 3829 times)

itszander

  • Playmaker Newbie
  • *
  • Posts: 12
FSM play out of order.
« on: September 28, 2012, 05:47:30 PM »
Hi all.
i've been trying to get my playmaker stuff to work well on iOS.

I initially created the project and only used mouse_down events, tried this on iOS and realized that none of the buttons worked. I then added a device "Touch Event" to each start state and had send event set to "touch" and also to nothing.

What I get, as a result, is that all my FSM play pretty much at the same time. I hit the first playmaker FSM and then all the subsequent fsm's fire even though there's been no touch event for those yet.

I have no idea what i am doing wrong and it works fine on the pc side.

-zander


itszander

  • Playmaker Newbie
  • *
  • Posts: 12
Re: FSM play out of order.
« Reply #1 on: September 29, 2012, 07:56:50 AM »
Anyone?
Could this be related to global events?


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: FSM play out of order.
« Reply #2 on: October 02, 2012, 06:28:38 AM »
Hi,

 Your Touch Event action is not sending any events, your are watching the "ended" phase where you should really watch the "started" phase... and you are mixing global events with state transitions ( "MOUSE UP" as a stats transition from "State 1" so there is a lot here to fix :)

-- while you can have "MOUSE UP" as a state transition, you need to be carful with this. instdea add it as a global transition on state "PlayAnimIntro_close" this will be easier to read and more in line ( in my opinion)

-- You do not want to trigger an action on the ended phase of touch, you likely want to do that as soon as the user is touching the screen Mouse and fingers do have a different way of being dealt with. Unless you have some very

In order to test your game, you can use Unity remote, so that you can still be within the editor and use the IOS device for the touching. Be aware that there is a latency so be precise in your touches and gestures for them to register, but that will definitly help you out making the right fsm for this.

bye,

 Jean