playMaker

Author Topic: Play Animation when previous one finishes.  (Read 487 times)

kiramarshiku

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Play Animation when previous one finishes.
« on: July 31, 2017, 09:39:13 AM »
I'm using legacy animations because I don't want to learn how to use FBX files in Mecanim. Anyway I'm using the play animation action but I really want to be able to set an animation to play only when the previous one is finished. Basically I have an idle that loops but I want to be able to finish the current idle loop before playing the next animation which is triggered by a button press. Is there anyway to do this? I would also appreciate advice on blending animations for smooth transitions.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4518
    • View Profile
    • jinxtergames
Re: Play Animation when previous one finishes.
« Reply #1 on: July 31, 2017, 12:20:33 PM »
Hi,
Blending animation is best done using animator, not easy to do with playmaker and also not easy to do in script.

But you can try.
For the idle to wait until ended when pressing a button you can try this:

state 1 : use 'Play animation' action and set a Finish Event to connect to state 2
state 2 : use 'bool test' and have a bool variable (call it "Button Pressed" for example)
if true go to state 3 , if false go back to state 1

You will also need to set the "Button Pressed" bool when the button is pressed.
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions