Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: emildragan on January 30, 2019, 03:47:18 AM

Title: Send event back
Post by: emildragan on January 30, 2019, 03:47:18 AM
Hello,

I have a very simple question and playmaker setup, maybe it's very simple, but any help would be appreciated.

My setup looks like in the attachment. It's a piano key that has an animation, a sound and a trigger. When the collider is in the trigger, the piano key plays the animation and the sound. The animation is done, instantly reset, but when I want to trigger it again only the sounds works, not the animation.

Thank you for your support.
Title: Re: Send event back
Post by: Groo Gadgets on January 30, 2019, 07:25:28 AM
What does your "Send Event" action do? Most of the action is cropped in the screenshot but it looks like you are sending a finished event back to itself. You don't need this since a finished event will execute when the actions have been processed (not the case if you ticked the every frame checkbox though). This shouldn't be your problem, just worth pointing out  :-)

Can you post screenshots of your animator window? Typically the way I would handle this kind of animation is to create an animator state that activates via a trigger, then when you want to trigger the animation use the Set Animator Trigger action.

Cheers,

Simon

Title: Re: Send event back
Post by: emildragan on January 30, 2019, 10:42:03 AM
Thank you for your quick response.

Basically, what I want to achieve is to play at a piano. Each piano key has an animation, moving down and up again and a sound attached. When I press the first time a key, it's pressing down and plays the sound correctly. If I want to press for multiple times, it plays the sound, but not the animation.

I have made the setup this way: on trigger event on key, send animator play, sound play and send event back to the trigger so it can play again.

I have attached again the prt screens with my playmaker setup.

Thank you.
Title: Re: Send event back
Post by: Groo Gadgets on January 30, 2019, 05:50:34 PM
I don't think your problem is in your FSM, can you post screenshots of your Animator window so I can see the state machine setup?

I'm guessing that your animation is stuck in the state that plays the animation.
Title: Re: Send event back
Post by: miguelfanclub on January 30, 2019, 06:18:27 PM
didnt the animator action you are using the old way for animation? before mecanim?