playMaker

Author Topic: Play character animation (loop) when character is within a trigger - 2DToolKit  (Read 3377 times)

minicades

  • Playmaker Newbie
  • *
  • Posts: 6
Hey playmaker people

I am working on a 2D sideways scroller skate game thats progressing nicely - I have a few things that maybe someone could easliy help me with.  Notes I am using Playmaker with 2DToolKit and the 2DTK actions provided.

1) I have a looping animation that I want triggered when ever the character is on the ground.  I have setup a state machine that for jumping (ollie) that triggers an animation whenever the user hits 'space' - works well but what I want is when ever the character lands back on the ground for it to trigger an animation and loop it until you hit space again (kinda like running character in Jetpack joyride).  When ever I have loop checked on an animation you can't trigger other animations (whats the work around for this)

I have tried a trigger cube that sits just above the ground but it seems to be conflicting with other animations and doesn't work properly.  The FSM looks like its doing the right thing by passing over to the 'Tk 2D Play Animation' state but it doens't play.  Is it because when your in the middle of one animation it can't play another (similar to the looping animation issue)

2) which leads to my second question - how do you blend between animations smootly (I am using 2DToolKit and the provided Toolkit actions - I need better interaction with the environment - lots of places to grind and do various tricks.

thanks for your help !
cheers,
Arran
Minicades.com.au
« Last Edit: March 27, 2012, 01:43:45 AM by minicades »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 to answer one of your question out of the blue ( I am currently looking up the rest of your questions).

 you can't blend animations made with sprites. by that I mean, the animation will have to stop in order to show a different image, this is not "animations" like in 3d where you can blend bones transform.

 So, really wait for the animation to end or just display the new animation. OR create in between animations to "transit" from one animation to the other.

 Does that make sense?

 Bye,

 Jean

minicades

  • Playmaker Newbie
  • *
  • Posts: 6
oh........I understand you can't blend 2D sprites - I meant can you play half an animation and then play another - right now it seems to have to play the entire sequence before the next animation can be triggered.