playMaker

Author Topic: Set Animator Int to play animation?[SOLVED]  (Read 3596 times)

PureArtist

  • Playmaker Newbie
  • *
  • Posts: 8
Set Animator Int to play animation?[SOLVED]
« 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.
« Last Edit: December 08, 2016, 03:36:25 AM by jeanfabre »

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Set Animator Int to play animation?
« Reply #1 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
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Set Animator Int to play animation?
« Reply #2 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

PureArtist

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Set Animator Int to play animation?
« Reply #3 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"
« Last Edit: December 05, 2016, 09:57:30 PM by PureArtist »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Set Animator Int to play animation?
« Reply #4 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