playMaker

Author Topic: Swapping weapons[SOLVED]  (Read 1527 times)

unearthly

  • Junior Playmaker
  • **
  • Posts: 62
Swapping weapons[SOLVED]
« 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.
« Last Edit: April 11, 2017, 01:44:42 AM by jeanfabre »

elusiven

  • Full Member
  • ***
  • Posts: 233
  • Debt we all must pay...
Re: Swapping weapons
« Reply #1 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.

unearthly

  • Junior Playmaker
  • **
  • Posts: 62
Re: Swapping weapons
« Reply #2 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