Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: PureArtist on December 04, 2016, 09:05:54 PM

Title: Set Animator Int to play animation?[SOLVED]
Post by: PureArtist on December 04, 2016, 09:05:54 PM
Hi I used Set Animator Int to play animation but it does not work am I supposed to convert the Animator Int to Animation name, how? please teach.
Title: Re: Set Animator Int to play animation?
Post by: mdotstrange on December 04, 2016, 11:15:56 PM
Set animator int just sets an int variable inside the animator component- to get it to play an animation you would use a transition that needs the int to transition
Title: Re: Set Animator Int to play animation?
Post by: jeanfabre on December 05, 2016, 08:53:55 AM
Hi,

 Parameters and layers are different, you can't set an animator Paramater for a certain layer, that's not working like that.

the Unity function doesn't expose any layer option:

https://docs.unity3d.com/ScriptReference/Animator.SetFloat.html

 or maybe I am missing something?

Bye,

 Jean
Title: Re: Set Animator Int to play animation?
Post by: PureArtist on December 05, 2016, 09:55:50 PM
Hi I have solved the issue, here's the solution:

Code: [Select]
https://www.youtube.com/watch?v=lvhUVLMqQ5s
"Set Animator Layer Weight"
Title: Re: Set Animator Int to play animation?
Post by: jeanfabre on December 08, 2016, 03:36:11 AM
hi,

 Yes, layer weight is pretty important indeed :) I am glad you figured it out.

 Bye,

 Jean