Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: intrikit on October 06, 2013, 02:52:03 AM

Title: Bool Animation - How to stop looping [SOLVED]
Post by: intrikit on October 06, 2013, 02:52:03 AM
(http://members.shaw.ca/session/boolean.jpg)

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.
Title: Re: Bool Animation - How to stop looping [SOLVED]
Post by: jeanfabre 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
Title: Re: Bool Animation - How to stop looping [SOLVED]
Post by: intrikit 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.
Title: Re: Bool Animation - How to stop looping [SOLVED]
Post by: jeanfabre on October 08, 2013, 11:05:28 AM
Hi,

 Very good! I am glad you sorted it.

 Bye,

 Jean
Title: Re: Bool Animation - How to stop looping [SOLVED]
Post by: tankun 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
Title: Re: Bool Animation - How to stop looping [SOLVED]
Post by: jeanfabre 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
Title: Re: Bool Animation - How to stop looping [SOLVED]
Post by: intrikit 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.
Title: Re: Bool Animation - How to stop looping [SOLVED]
Post by: tankun on October 16, 2013, 12:16:45 AM
Ah, yes. Got it, thank you very much.