playMaker

Author Topic: trigger different animation on NPC  (Read 2764 times)

Dizney23

  • Playmaker Newbie
  • *
  • Posts: 3
trigger different animation on NPC
« on: January 04, 2018, 02:50:52 PM »
So I have an NPC who is set to an idle animation in his controller and I want my trigger to make him switch to a different animation. More specifically to go from an idle animation to a sitting animation. How do I accomplish this? Also wondering how I incorporate this with Salsa Lipsync so that when the sitting animation plays when its triggered then the Salsa lipsync will begins and not before (if possible). Thanks in advance for any help.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: trigger different animation on NPC
« Reply #1 on: January 05, 2018, 05:25:41 AM »
Put an animator on the npc, make animator, drag all his animations to mecanim, and the play animations with "animator play" action. Unfortunately, i don't know how salsa lipsync functions, so i can't help you with that, but i guess there's a method that has to be started, so, start it together with animation.
Available for Playmaker work

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: trigger different animation on NPC
« Reply #2 on: January 05, 2018, 08:29:29 AM »
Hi.
There are also many 'Animator' actions which can be useful, to set a int/bool/float and many other things.

Animation events could be useful to trigger events to activate salsa :


Dizney23

  • Playmaker Newbie
  • *
  • Posts: 3
Re: trigger different animation on NPC
« Reply #3 on: January 05, 2018, 09:26:24 AM »
Put an animator on the npc, make animator, drag all his animations to mecanim, and the play animations with "animator play" action. Unfortunately, i don't know how salsa lipsync functions, so i can't help you with that, but i guess there's a method that has to be started, so, start it together with animation.

Thank you for the response!! Let me see if I understand what you are saying. By "put an animator on the npc" do you mean: (put an animation controller on the npc?) And by "make animator" do you mean: (make an animation controller?) Because he already has one for his idle animation. So if I understand correctly I need to drag all the animations I want into his animation controller? Is this what you mean by "drag all his animations to mecanim?

Unfortunately I'm lost with trying to understand what you mean by "and the play animations with "animator play" action." I'm kind of a noob at this. If you could help me out by explaining this a little better I would really apprentice it.

Thanks again!!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: trigger different animation on NPC
« Reply #4 on: January 05, 2018, 03:49:45 PM »
Hi,
Here is a tutorial about the animator which can get you in the right direction :


Dizney23

  • Playmaker Newbie
  • *
  • Posts: 3
Re: trigger different animation on NPC
« Reply #5 on: January 05, 2018, 06:49:51 PM »
Djaydino thank you so much for those videos I just started watching them and I am sure they will provide me with exactly what I need!! Really appreciate it. :)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: trigger different animation on NPC
« Reply #6 on: January 06, 2018, 10:54:59 AM »
Hi.
No problem, happy to help.
Btw. you can find many tutorials on the User Tutorial Wiki page