Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Jimmy P on May 26, 2017, 05:29:26 AM

Title: Trouble with sending event On Click (ugui button)
Post by: Jimmy P on May 26, 2017, 05:29:26 AM
I'm trying to get a button to send an On Click event to a gameobject with an FSM. I do the exact same thing on another object and it works fine. If I change the text to match that of an event in a different FSM on the same object, it fires fine (in that other FSM). I tried changing the FSM to use the event that fired in the other FSM, and then it works.. but obviously that's not a solution. I've tried making new events with different names, global and not, and none of it works.

I'm completely stumped. This doesn't seem logical at all. Any tips would be appreciated.

Title: Re: Trouble with sending event On Click (ugui button)
Post by: jeanfabre on June 30, 2017, 04:57:48 AM
Hi,

 did you made any progress on this or do you need help?

 Bye,

 Jean
Title: Re: Trouble with sending event On Click (ugui button)
Post by: Jimmy P on September 26, 2017, 05:02:20 AM
I stopped working on my project for a while but would like to resume and still have this problem. It feels really weird. I agree it's hard to communicate effectively with words, so I made a video to showcase it. I'm sure I'm missing something totally obvious.


The mouse cursor is invisible but you can see that I'm clicking the buttons.
Title: Re: Trouble with sending event On Click (ugui button)
Post by: djaydino on September 26, 2017, 12:59:51 PM
Hi,
Unfortunately that will not work because the fsm's are on the same gameobject.
Unity does not know which fsm is what, so it pics 1 only (usually the 1st added)

So what you can do is place the other fsm on a different game object and add another onclick for that fsm/gameobject