Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: unearthly on December 07, 2016, 04:54:05 PM
-
Hi
I want to make an FSM that can check if an animation is running and use it as a precondition to allow a subsequent animation to be activated by a button press.
Thanks in anticipation.
-
Hi,
If you use the animator you can use "PlayMaker Animator Fsm State Synch"
-
Thanks for the reply but I am reluctant to use Animator.
The animations I have just need to be triggered at appropriate times. I have a gun idle animation which when running I want the player to be able to trigger related animations by button presses. However I don't want any secondary melee weapon animations to be so activated except when that weapons idle animation is running.
-
Hi,
What you want to do is best done in animator.
You can look to some unity animator tutorials and search for 'animator' in the playmaker actions to get/set a int/float/bool/.... which you can trigger with a button.
I used to do it also with animation actions until i learned how to use the animator.
after i learned it i had to redo several of my games...
But everything looks smoother now and works great.
-
Hi djaydino,
I have used Animator a little but got discouraged having used it with poorly put together animations in the Animation part of Unity. Having then made my animations in a separate 3D program I thought it would be simpler to avoid Animator. But I can see there are a lot more Playmaker actions supporting Animator.
What I want to do can be condensed into two main objectives:
To change animations according to speed of the parent object.
To allow certain animations to play only after a particular animation has been running and no others (despite button presses which would otherwise activate those others)
So I should be able to use it to do the above? I will give it a go and hope you can help me again.
-
Hi, looks like the Animator State Synchronization component might make it possible to directly attach my FSM to an animator state. However, I just updated my project to Unity 5.5.1 so will that component work in this version?
-
Hi,
If nothing special changed to the animator it should be fine, if you have problems you can submit a bug report.
You can find it in unity under Playmaker/Tools
-
Thanks djaydino,
Animator State Synchronization does work in Unity 5.5.1 I can now disable the FSM's I wanted from running on particular Animator states. Very easy to use, solves a whole heap of problems. This can be considered solved. :)
-
where do I find this? the download page says not to add it as it is included now, but I can't find it in the actions list
-
Hi,
@HeathClose
I do not know what actions you are looking for?
the "PlayMaker Animator Fsm State Synch" is not an action but a component script.
Place the component on an object and drop in the fsm that you want to sync