Triggering animations with conversations
Triggering animations with conversations
I have yet to see how to trigger an animation on a game object when a conversation element is presented. I saw with portraits you can trigger them via a pic tag, but even that was hard to find general information on. How can I trigger animations?
Re: Triggering animations with conversations
Hi,
Use the AnimatorPlayWait() sequencer command in the node's Sequence field. For example, say your NPC has an animator state named "dance":
Use the AnimatorPlayWait() sequencer command in the node's Sequence field. For example, say your NPC has an animator state named "dance":
- Dialogue Text: "Watch me dance!"
- Sequence: AnimatorPlayWait(dance)
Re: Triggering animations with conversations
Thank you for the quick reply. The only way I've seen to associate a game object to a piece of dialog was with the ConversationTrigger component. What other methods are there? I'm sorry if I'm overlooking things, this is a somewhat expansive product (that's a good thing).
Re: Triggering animations with conversations
I believe I found more information about associating game objects with conversations in the docs, I'll add another reply if I'm still confused later.
Re: Triggering animations with conversations
I am doing something akin to a graphic novel. I have a character on screen who speaks to the player who has no model. What's the best way to start these sorts of conversations so the character who's speaking has their game object associated with the conversation?
Re: Triggering animations with conversations
Can you create an empty GameObject for the model-less player? This way in the future you can add scripts to it in that can receive player-specific messages such as OnConversationStart for conversations that involve the player. Otherwise, you can just leave the Conversation Trigger's Actor field blank, and assign the NPC to the Conversant field.
If you want to set different default sequences for the NPC vs. the player, you can set the Dialogue Manager's Camera Settings > Default Sequence and Default Player Sequence fields. For example, the sequences below do a closeup of the NPC and wait for a time, but for the player it only waits (since the player doesn't have a model to do a closeup on):
If you haven't already read How GameObjects Are Associated With Conversations, you may find it handy.
If you want to set different default sequences for the NPC vs. the player, you can set the Dialogue Manager's Camera Settings > Default Sequence and Default Player Sequence fields. For example, the sequences below do a closeup of the NPC and wait for a time, but for the player it only waits (since the player doesn't have a model to do a closeup on):
- Default Sequence: Camera(Closeup); Delay({{end}})
- Default Player Sequence: Delay({{end}})
If you haven't already read How GameObjects Are Associated With Conversations, you may find it handy.