Good day! I have questions on dialogue system.
Through Set Animation on Dialogue event, can I trigger animations by putting script in dialogue database?
How to disable the components like the third person controller, the Simple camera rotator? I'm using the third personcharacter prefab and I put a script or component on the pivot of multi purpose camera. I'm using unity standards assets.
What is the custom position from the component Selector?
I have questions on dialogue system
Re: I have questions on dialogue system
Hi,
To trigger animations at specific dialogue entry nodes, use the Animation() sequencer command (for legacy animation) or AnimatorXXX() commands (for Mecanim). For example, to make a Mecanim character dance:
You will normally use Set Animation On Dialogue Event to set animation at the start or end of a conversation. For example, you can force the character into an idle animation when the conversation starts.HaiiroMukuro wrote:Through Set Animation on Dialogue event, can I trigger animations by putting script in dialogue database?
To trigger animations at specific dialogue entry nodes, use the Animation() sequencer command (for legacy animation) or AnimatorXXX() commands (for Mecanim). For example, to make a Mecanim character dance:
- Dialogue Entry 1:
- Dialogue Text: "Watch me dance!"
- Sequence: AnimatorPlayWait(dance)
- Dialogue Entry 2:
- Dialogue Text: "Whew! I'm tired now!"
- Sequence: AnimatorPlay(idle); Delay({{end}})
Use Set Component Enabled On Dialogue Event to enable/disable components and/or Set Active On Dialogue Event to activate/deactivate GameObjects. For an example, see the Feature Demo scene's Player. When the player starts a conversation, it disables the movement and camera control components. When the conversation ends, it re-enables them.HaiiroMukuro wrote:How to disable the components like the third person controller, the Simple camera rotator? I'm using the third personcharacter prefab and I put a script or component on the pivot of multi purpose camera. I'm using unity standards assets.
This allows you to specify your own screen position instead of using the Center Of Screen or Mouse Position. The Selector runs a raycast from the position into the scene to look for objects that it can select.HaiiroMukuro wrote:What is the custom position from the component Selector?
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: I have questions on dialogue system
Hi,
The error means that the animation clip ("laughing" or "Talking") isn't in the list of animation clips on Shirley's Animation component.
If Shirley has an Animator component (and not an Animation component), you should use a Set Animator State On Dialogue Event component instead. However, if you're using Unity's Standard Assets ThirdPersonController, see below.
If you're using Unity's Standard Assets ThirdPersonController, here are the steps:
1. Add ThirdPersonUserControl to the Set Component Enabled On Dialogue Event component.
2. Add a Start Sequence On Dialogue Event component.
2a. Set the Trigger to OnConversation.
2b. Add an element to OnStart.
2c. Assign the ThirdPersonController GameObject as the element's Actor.
2d. Set the element's Sequence to:
This will:
1. Turn off ThirdPersonUserControl during conversations. This prevents the user from issuing movement commands to the ThirdPersonController.
2. At the start of the conversation, set the ThirdPersonController's Animator parameters to tell the Animator to stop playing the movement animation (i.e., tell it to stop running).
Here's an example scene:
StdTPC_Example_2016-10-04.unitypackage
The error means that the animation clip ("laughing" or "Talking") isn't in the list of animation clips on Shirley's Animation component.
If Shirley has an Animator component (and not an Animation component), you should use a Set Animator State On Dialogue Event component instead. However, if you're using Unity's Standard Assets ThirdPersonController, see below.
You may need to disable additional components or perform additional steps.HaiiroMukuro wrote:Also I got a problem for set enable on dialogue which the character moves continuously without pressing the controls. The problem occurs when you keep holding the movement controls and starts a conversation.
If you're using Unity's Standard Assets ThirdPersonController, here are the steps:
1. Add ThirdPersonUserControl to the Set Component Enabled On Dialogue Event component.
2. Add a Start Sequence On Dialogue Event component.
2a. Set the Trigger to OnConversation.
2b. Add an element to OnStart.
2c. Assign the ThirdPersonController GameObject as the element's Actor.
2d. Set the element's Sequence to:
Code: Select all
AnimatorFloat(Forward,0);
AnimatorFloat(Turn,0)
1. Turn off ThirdPersonUserControl during conversations. This prevents the user from issuing movement commands to the ThirdPersonController.
2. At the start of the conversation, set the ThirdPersonController's Animator parameters to tell the Animator to stop playing the movement animation (i.e., tell it to stop running).
Here's an example scene:
StdTPC_Example_2016-10-04.unitypackage