playMaker

Author Topic: Bool Animation - How to stop looping [SOLVED]  (Read 7272 times)

intrikit

  • Full Member
  • ***
  • Posts: 132
    • View Profile
    • Defiant Child
Bool Animation - How to stop looping [SOLVED]
« on: October 06, 2013, 02:52:03 AM »


This is doing my head in. I managed to activate a jump through a boolean condition in mecanim. But how do I stop it from looping? I noticed in the Unity Mecanim Tutorial that when the jump key is pressed, the box beside the Jump Condition Boolean in Mecanim is deactivated once the animation is played while mine remains and the animation therefore loops.
« Last Edit: October 07, 2013, 01:24:08 AM by intrikit »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Bool Animation - How to stop looping [SOLVED]
« Reply #1 on: October 08, 2013, 12:20:07 AM »
Hi,

 your condition seems good. I am not sure what's wrong here.Maybe your jump input stays true?

Bye,

 Jean

intrikit

  • Full Member
  • ***
  • Posts: 132
    • View Profile
    • Defiant Child
Re: Bool Animation - How to stop looping [SOLVED]
« Reply #2 on: October 08, 2013, 10:26:40 AM »
In the Jump state which has the Bool set to true, instead of sending a FINISHED event, it had to be a STOP event that transitions into another state that sets the Bool to false before transitioning back to the Start state. Otherwise the Bool stayed true.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Bool Animation - How to stop looping [SOLVED]
« Reply #3 on: October 08, 2013, 11:05:28 AM »
Hi,

 Very good! I am glad you sorted it.

 Bye,

 Jean

tankun

  • Playmaker Newbie
  • *
  • Posts: 26
    • View Profile
Re: Bool Animation - How to stop looping [SOLVED]
« Reply #4 on: October 15, 2013, 03:22:05 AM »
Hi Intrikit,

I'm trying to do the same thing. What is this STOP event are you talking about? It's not a system event right? Can you share a picture of your state machine if it's not too much trouble?

Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Bool Animation - How to stop looping [SOLVED]
« Reply #5 on: October 15, 2013, 10:59:37 PM »
Hi,

 the "STOP" event if an event you create yourself for that Fsm. I use this technic in the mecanim samples. Have you studied them?

https://hutonggames.fogbugz.com/default.asp?W1031

Select the "character PlayMaker say Hi" Prefab and fsm "jump" and you'll see how it's implemented.


Bye,

 Jean

intrikit

  • Full Member
  • ***
  • Posts: 132
    • View Profile
    • Defiant Child
Re: Bool Animation - How to stop looping [SOLVED]
« Reply #6 on: October 16, 2013, 12:09:50 AM »
Exactly as Jean said. I used a Get Button Up action to send the STOP event to another state that had a Set Animator Bool that had a False value.

tankun

  • Playmaker Newbie
  • *
  • Posts: 26
    • View Profile
Re: Bool Animation - How to stop looping [SOLVED]
« Reply #7 on: October 16, 2013, 12:16:45 AM »
Ah, yes. Got it, thank you very much.