playMaker

Author Topic: Chaining attack problem  (Read 399 times)

hoyoyo80

  • Junior Playmaker
  • **
  • Posts: 86
    • View Profile
Chaining attack problem
« on: January 24, 2019, 07:38:27 AM »
Hi all,

Im learning about chaining attack by press 'a button' from this video and switching from first
Animation to the second if button is press during the first animation.
This video:

I look at it and implement it myself, the chaining is like speed up the current animation and quickly go to the next animation. Is there any way we can let first animation finish and start the next one?

Thanks

hoyoyo80

  • Junior Playmaker
  • **
  • Posts: 86
    • View Profile
Re: Chaining attack problem
« Reply #1 on: January 24, 2019, 03:31:14 PM »
Update: i got it working by using animation event to start detect key after desire frame only. Is there any other way? Thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4582
    • View Profile
    • jinxtergames
Re: Chaining attack problem
« Reply #2 on: January 24, 2019, 09:03:48 PM »
Hi.
You can use a Float variable inside the animator to affect the animation speed.
In the animator, select a state with the animation that you want to manipulate by speed.

In the inspector below 'Speed' you can see 'Multiplier'.
Check the parameter and set the float variable there.
You can set it default to 1.

in playmaker you can use "Set Animator Float" to adjust the multiplier.

To know if animation is ended you can for example use :
Get Animator Current Transition Info Is Tag
and set a tag on the 2nd animation.

You can also do a send event from within the animation itself, but you will need to have an fsm on the same object as the animator.

here is a video about the event (btw it will not popup anymore, but it will show in the inspector)


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14595
  • Official Playmaker Support
    • View Profile
Re: Chaining attack problem
« Reply #3 on: January 25, 2019, 12:01:15 AM »
Hi,

 If you are using Animator, I would strongly suggest you get the proxies I made on the Ecosystem, you can sync fsm states with animator states, making it easy to do such thing.

Bye,

 Jean

hoyoyo80

  • Junior Playmaker
  • **
  • Posts: 86
    • View Profile
Re: Chaining attack problem
« Reply #4 on: January 25, 2019, 12:03:29 AM »
Thanks for the fast reply:) ill tried and report back. i also browse thru playmaker action Get Animator Current Transition Info Is Tag but dont really know how to use it to determine current animation ended or not.

Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14595
  • Official Playmaker Support
    • View Profile
Re: Chaining attack problem
« Reply #5 on: January 25, 2019, 12:28:30 AM »
Hi,

 yeah... you will be better off using the proxy.

 Bye,

 Jean