playMaker

Author Topic: [SOLVED] FSM play out of order iOS  (Read 5033 times)

itszander

  • Playmaker Newbie
  • *
  • Posts: 12
[SOLVED] FSM play out of order iOS
« on: October 01, 2012, 10:08:30 AM »
Hi there,
i'm using playmaker and i've come across a serious problem that I can't fix. I'm now beginning to assume that this is a bug within your system, although it could be operator error.

Long story short---I created a series of playmaker actions for a tutorial flow in my game. This worked fine on PC. I then tried to deploy to iOS and realized that I had forgotten to include any touch events. Other FSM systems that i've used before assume that a mousedown is the same as a touch event.

Anyhow, so I go back into my flows, add an initial touch event to the idle states for any buttons, then try to build to iOS.  What I get at this point is that my FSMs all fire at different points in time. After the first button  click, almost all subsequent fsms activate, fire an animation, all that the same time.

I've tried to debug this.  My last hope now is that i'm reinstalling my copy of Playmaker and seeing if this does anything.


Any help would be immensely appreciated.
« Last Edit: October 01, 2012, 06:38:10 PM by itszander »

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: FSM play out of order iOS
« Reply #1 on: October 01, 2012, 11:43:26 AM »
that seems very weird... did you make sure to use "touch object event" instead of "touch event" ? It's not caused by playmaker I think, I've used the touch actions already.

About the mouse not being a touch at the same time, that's not playmaker's fault, it's unity3D which uses different libraries for differen input devices... actually I'm surprised any FSM would do that.
Best,
Sven

itszander

  • Playmaker Newbie
  • *
  • Posts: 12
Re: FSM play out of order iOS
« Reply #2 on: October 01, 2012, 01:42:53 PM »
i've been using touch event. Should I use touch object event?

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: FSM play out of order iOS
« Reply #3 on: October 01, 2012, 01:50:14 PM »
well touch object event detects if you touch a certain object by using a raycast I think. The other touch event just detects touches. Plain and simple. SO of course if every object that's supposed to be touched gets triggered if you press anywhere on the screen, it'll be a great mess :D

EDIT: If your buttons are GUI elements, you'd need touch GUI event of course.
« Last Edit: October 01, 2012, 01:52:14 PM by kiriri »
Best,
Sven

itszander

  • Playmaker Newbie
  • *
  • Posts: 12
Re: FSM play out of order iOS
« Reply #4 on: October 01, 2012, 03:15:16 PM »
OK, I will try to check this out.  I am using nGUI for the gui solution for the native unity stuff. Not sure if I need to use GUI event with nGUI ( I tried this already and it told me I needed to add a GUI component to my nGUI buttons.)


kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: FSM play out of order iOS
« Reply #5 on: October 01, 2012, 03:29:10 PM »
I'm sorry, I have no experience witch nGui, but I can assure you the normal actions cannot work.
Have a look at this : http://hutonggames.com/playmakerforum/index.php?topic=1356.0
Best,
Sven

itszander

  • Playmaker Newbie
  • *
  • Posts: 12
Re: FSM play out of order iOS
« Reply #6 on: October 01, 2012, 03:45:14 PM »
thanks for your help. I have just changed all FSM actions over to Touch Object. Fingers crossed.


itszander

  • Playmaker Newbie
  • *
  • Posts: 12
Re: FSM play out of order iOS
« Reply #7 on: October 01, 2012, 05:11:24 PM »
Ok, that didnt work. Now when I play the game none of the buttons are clickable.

itszander

  • Playmaker Newbie
  • *
  • Posts: 12
Re: FSM play out of order iOS
« Reply #8 on: October 01, 2012, 06:37:50 PM »
SOLVED

It seems that I needed Touch Object Event instead of touch event

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: [SOLVED] FSM play out of order iOS
« Reply #9 on: October 02, 2012, 09:47:37 AM »
that's quite interesting since it means every ngui element is converted to a plane which actually contains a plane real unity collider...
Normally Touch Object Event works on real geomitry, so if you had a sphere in your scene and touched it in your app, that event would be triggered. Since GUI stuff is normally not real, since it's so to say put on top oif your "real scene" stuff, I thought it wouldn't work... Great that it does work though, otherwise you'd require another set of actions for nGUI (which are WIP).
Best,
Sven

itszander

  • Playmaker Newbie
  • *
  • Posts: 12
Re: [SOLVED] FSM play out of order iOS
« Reply #10 on: October 03, 2012, 11:21:46 AM »
you're correct. nGUI draws a box collider on any gui object and creates a poly for it. So it goes!

-zander

p.s. thanks for your help.