Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: tcmeric on February 12, 2017, 12:51:39 AM

Title: UnityEvent to Playmaker[SOLVED]
Post by: tcmeric on February 12, 2017, 12:51:39 AM
Hi,

Maybe I am missing something obvious. I have a script on an object that has a UnityEvent, that can be changed in the inspector. I would like those events to send a event to playmaker. I havent been able to find an answer to this by searching, but I am sure it has come up again.

(http://i.imgur.com/TA6yssQ.png)

You can see the script called "Health Manager". I would like it to fire a playmaker event for example when On Damage () occurs.

Any advice? Thank you!
Title: Re: UnityEvent to Playmaker
Post by: mdotstrange on February 12, 2017, 01:12:31 AM
Try dragging an FSM into the field that says "None (Object)" you should be able to use Playmakers Send Event from there
Title: Re: UnityEvent to Playmaker
Post by: tcmeric on February 13, 2017, 01:19:05 AM
Thanks for the tip. Ill give it a try. I am taking 2 of your courses right now. Behavior designer and playmaker.
Title: Re: UnityEvent to Playmaker[SOLVED]
Post by: charming_fox on July 19, 2019, 09:48:41 AM
Hi,

Did this work? I have tried this and the event didn't fire, can you offer any advice on why that might be? thanks!
Title: Re: UnityEvent to Playmaker[SOLVED]
Post by: djaydino on July 19, 2019, 10:17:17 AM
Hi.
Drag in the fsm, then on 'fuction' select send event (string) and place event name that you want to send.

make sure runtime only is set.

if you have multiple fsms on an object you might need to move the fsm above the other fsms in the inspector
Title: Re: UnityEvent to Playmaker[SOLVED]
Post by: charming_fox on July 20, 2019, 05:01:58 AM
Thanks, I was dragging the GO into the slot but it actually has to be the FSM, it's a little awkward to do that for an FSM on another GO because you need to open two inspectors and lock one of them.

Cheers
Title: Re: UnityEvent to Playmaker[SOLVED]
Post by: djaydino on July 21, 2019, 02:40:52 PM
Hi.
Yes indeed, if the fsm is on a different object you will have to use 2 inspectors and lock one of them.
I forgot to mention this :)