Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: cloobot on February 04, 2014, 09:53:37 AM

Title: Event from Animation frames... multi FSM conflict?
Post by: cloobot on February 04, 2014, 09:53:37 AM
Has anyone else noticed an issue with trying to SendEvent (String) from an Event marker on an Animation frame, if there are multiple FSMs on a GameObject? It seems to work fine if there is one FSM -- if there are two, the Functions drop down doesn't work. Any idea why that might be?
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: jeanfabre on February 05, 2014, 04:52:28 AM
Hi,

 Can you explain more about your setup? I am not sure I full yunderstand how you go from animation frames to playmaker events.

bye,

 Jean
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: cloobot on February 05, 2014, 01:33:53 PM
Sure thing.

I'm sending an event from my animation to trigger a sound (https://hutonggames.fogbugz.com/default.asp?W181). As long as I only have one FSM on my game object, it works fine. If I add a second one, or if I have more than one to begin with, then the Function dropdown doesn't work when I add my animation event.
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: jeanfabre on February 06, 2014, 03:09:50 AM
Hi,

 Can you send me a repro package? withat animation?

bye,

 Jean
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: cloobot on February 06, 2014, 07:31:00 PM
It's not just one specific animation -- it's any animation attached to a game object, with more than one FSM on the same game object. This really isn't occurring for anyone else?
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: Alex Chouls on February 06, 2014, 10:15:06 PM
I don't think the Unity UI for selecting animation event functions works if there is more than one instance of a component type on the GameObject. I did a test with a regular script added twice to the same GameObject and had the same problem...
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: jeanfabre on February 07, 2014, 02:56:21 AM
Hi,

 I only meant as a convenience for me to look at this quickly, sorry :)

Bye,

 Jean
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: cloobot on February 07, 2014, 11:28:46 AM
I don't think the Unity UI for selecting animation event functions works if there is more than one instance of a component type on the GameObject.

Ugh, right you are. How annoying.
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: Alex Chouls on February 07, 2014, 11:57:42 AM
It's a bit of a pain, but you could make a script to just forward animation events to PlayMakerFSMs. There would only ever be one of these scripts on a GameObject. Actually that would be a useful addition to playmaker... I'll try to get that into the next update...
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: bentarthur on May 31, 2014, 10:31:40 PM
Also having the same issue - trying some complex character movement animations, and being able to trigger multiple FSMs with animation events would be very useful, but right now I can't choose any functions in my animation event drop down.
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: cloud03 on September 28, 2014, 07:51:39 AM
Sorry for waking an old thread, but is this problem has been addressed on the latest playmaker? Thanks
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: mdotstrange on November 18, 2014, 07:34:34 AM
I've just run into this issue with the current release so it seems its still a problem-
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: kavery on January 29, 2017, 12:11:25 AM
Has anyone figured out a work around while having multiple FSMs? Somebody mentioned forwarding events but I can't figure out how to involve another game object. Unfortunately I can't remove the extra FSMs.
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: Ofonna on January 31, 2017, 04:33:09 AM
Has anyone figured out a work around while having multiple FSMs? Somebody mentioned forwarding events but I can't figure out how to involve another game object. Unfortunately I can't remove the extra FSMs.

can you make your question clearer?

you can send global events to other fsms if that's what you're asking,
simply create an event and click the box next to it to mark it as a global event and then right click on the state you would like to send the event to, select the global event and simply send whatever from whichever fsm you want
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: kavery on February 01, 2017, 12:54:31 PM
Sorry Carmichael, I was assuming context from the previous comments. The problem is there are no send event choices in the dropdown menu for animation events when you have more than 1 FSM (or multiples of any component).

I'd like to be able to send an event during a specific frame of an animation but it still seems impossible for me. 
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: Ofonna on February 01, 2017, 08:35:00 PM
Sorry Carmichael, I was assuming context from the previous comments. The problem is there are no send event choices in the dropdown menu for animation events when you have more than 1 FSM (or multiples of any component).

I'd like to be able to send an event during a specific frame of an animation but it still seems impossible for me.

ooh that's strange....it works for me.
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: kavery on February 02, 2017, 02:44:41 PM
Maybe it's simply a matter of upgrading. What version of Unity and PM are you using?

THANKS
Title: Re: Event from Animation frames... multi FSM conflict?
Post by: jeanfabre on February 06, 2017, 01:12:54 AM
Hi,

 I would use the Event Proxy Wizard, which lets you create a component with a public method which can then forward a PlayMaker event accuratly.

-- you likely have it already if you have PlayMaker Utils, it's in the menu "PlayMaker/Addons/Tools/Event Proxy Wizard"

-- else it's on the ecosystem.

Bye,

 Jean