Trigger character animation

  • #1, by trepnFriday, 12. October 2018, 12:53 6 years ago
    I was wondering how I can trigger a custom character animation. After a dialog the NPC is angry and starts jumping and stamping. I've placed this animation in Characer Animation under my default outfit. Is this the right way to do it? or do I need to put it in a seperate animation in the scene and hide the NPC till the animaiton is done and then show it again?

    Newbie

    60 Posts


  • #2, by afrlmeFriday, 12. October 2018, 14:10 6 years ago
    You mean you created it as a character animation in the default outfit of the npc character, yes?

    In the dialog section, you may have noticed that there's a bit on the right hand side where you can create custom action parts - "execute action". Any action parts you place in there should be executed after the npc speaks their part.

    Quick note: if you leave the reponse part & alternate text input boxes empty & enable the alternative text option, then it will skip both the player text & npc text & immediately execute any action parts you added, which allows you to get more creative with dialog based conversations as you can have a conversation with more than 1 npc that way or have some other npc in the scene chip in, or play custom animations, change conditions & so on.

    Imperator

    7278 Posts

  • #3, by esmeraldaFriday, 12. October 2018, 15:11 6 years ago
    jep, place the animation in the character outfit under "character animations" and just use the "play/hide animation"action part to call it. There you can choose the animation you want to play. (if in the dialog section: there is a "lightning" button that opens a popup window for actions - like AFRLme described)
    No need to hide/show the NPC or put the animation anywhere else.

    Key Killer

    513 Posts

  • #4, by trepnFriday, 12. October 2018, 15:11 6 years ago
    Tnx Lee

    Yes I was so far already, but what do I use to trigger the animation? Change character animation index? and if so, what is the index?

    Newbie

    60 Posts

  • #5, by afrlmeFriday, 12. October 2018, 15:16 6 years ago
    As Esmeralda just said, use the "play animation" action part.

    Character animation index is to do with something else. Let's say you have 3 talk animations in the same outfit with the same direction. The character animation index determines which talk animation would be played. It only really affects the walk, talk, idle & random animations as these are triggered automatically by the engine & not manually started by you with action parts/Lua script.

    Imperator

    7278 Posts

  • #6, by esmeraldaFriday, 12. October 2018, 15:19 6 years ago
    the index is a way to change the regular animations like talk, walk...
    If for example you want to express differnt moods while talking, you can create different talk animations for the same direction (like front, back, left ...) and change the index to tell the engine which of the animations should be played.

    Edit: too late :-)

    Key Killer

    513 Posts

  • #7, by afrlmeFriday, 12. October 2018, 15:22 6 years ago
    the index is a way to change the regular animations like talk, walk...
    If for example you want to express differnt moods while talking, you can create different talk animations for the same direction (like front, back, left ...) and change the index to tell the engine which of the animations should be played.

    Edit: too late :-)
    grin

    Imperator

    7278 Posts

  • #8, by trepnFriday, 12. October 2018, 15:31 6 years ago
    grin

    Tnx both! I got it. I thought the play animation was only for animation objects on the scene, but my character animation was also there.

    Newbie

    60 Posts

  • #9, by afrlmeFriday, 12. October 2018, 15:47 6 years ago
    It's for all animations that can be manually started.

    Imperator

    7278 Posts