playMaker

Author Topic: A FSM target only can listen to one NGUI Button??  (Read 1656 times)

CPY

  • Playmaker Newbie
  • *
  • Posts: 4
A FSM target only can listen to one NGUI Button??
« on: March 05, 2014, 02:01:54 AM »
Hi,

I'm studying for playmaker and NGUI button.
I found that for a FSM target object only can listen to one button.

for example I have a ball and two button "START" and "RESET"
I'd like to use START to throw the ball and RESET to move it back to original point.
But the ball FSM only can listen to the same event "NGUI / ON CLICK",
and it can't tell the event is from which button.

Is there any other solution for one FSM target object to listen to two button?

Thanks for helping! :-)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: A FSM target only can listen to one NGUI Button??
« Reply #1 on: March 06, 2014, 12:05:29 AM »
Hi,

 yes, in the event proxy, point to that fsm. You spotted that even tho it detect if an fsm is there and by default hook to it you can still drag any fsm on there. The trick is to open TWO Unity inspector, lock the one with the event proxy and with the other inspector, select the other gamobject with the fsm you want to target and then drag that fsm component onto the proxy component.

 Hopefully that make sense :)

bye,

 Jean