Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: unearthly on December 06, 2016, 08:02:57 PM

Title: Swapping weapons[SOLVED]
Post by: unearthly on December 06, 2016, 08:02:57 PM
Hi,

This is a second question about using my pre-made imported animations on a player controller.

I have an 'idle gun' animation as the initial animation running on the player controller:

How can I set up an FSM which includes a button press to play my 'lower gun' animation, then a 'raise melee' weapon animation, followed by that weapons idle animation?

Then the same button press to play the 'lower melee animation, then 'raise gun', back to  the 'gun idle' animation.
Title: Re: Swapping weapons
Post by: elusiven on December 08, 2016, 05:53:11 AM
A button press is a ugui action, if you don't have them in your action list you need to download ecosystem and download it from there. Then it's ugui button on click action. So you setup on that button object this fsm, and this action will listen for clicks, on it's clicked just make it do whatever you need, play anim, hide or show weapon etc. You can setup as many states with this as you like, and then as many transitions to states too. So you can have 3 states, and all of them will have the button on click action.
Title: Re: Swapping weapons
Post by: unearthly on February 25, 2017, 05:17:51 AM
Used the animations in Animator states which allowed me to attach whatever key presses I wanted to trigger them. Solved. ;D