Page 2 of 3

Re: Is Fallout / Skyrim / Dishonored style dialogue possible?

Posted: Wed Jul 04, 2018 3:55 pm
by SuperSal
Do I have to create animation controller when the NPC will talk or will I use Cutscene Sequencer? (I know, I might be bit annoying but I have to ask these questions)

Re: Is Fallout / Skyrim / Dishonored style dialogue possible?

Posted: Wed Jul 04, 2018 4:16 pm
by Tony Li
The Dialogue System does everything the proper Unity way, as much as possible. This means you'll need to set up an animator controller in Unity. The Dialogue System will work with that animator controller.

The steps to create an animator controller are quite simple:

1. Right-click in the Project view, and select Create > Animator Controller. Assign this to your NPC.

2. Double-click on the Animator Controller to open the Animator canvas window. Drag all your animation clips from the Project view into the Animator canvas.

That's it. Each animation clip will have a corresponding animator state in the canvas, similar to this:

Image

To play the animation "Hello" in a dialogue entry node, just set the node's Sequence field to:

Code: Select all

AnimatorPlayWait(Hello)
If you don't want to use an animator controller, you can use Unity's legacy animation system. The Dialogue System supports this, too, with the Animation() sequencer command.

Re: Is Fallout / Skyrim / Dishonored style dialogue possible?

Posted: Wed Jul 04, 2018 4:59 pm
by SuperSal
Oh, if I use Animation Controller I don't have to link up animations..right? and let me get this straight now when I will set up all of these animations in Animation Controller..The Unity Dialogue System will play these animations when I will chose a question from the UI..But I have to link up Idle (siting),, standing and return to idle...Tell me did I get everything right this time?

Re: Is Fallout / Skyrim / Dishonored style dialogue possible?

Posted: Wed Jul 04, 2018 7:37 pm
by Tony Li
If you use the Dialogue System's AnimatorPlay() and/or AnimatorPlayWait() commands, you don't need to link up anything. You can use Dialogue System Triggers like I described earlier in this thread to handle sitting and standing using AnimatorPlay(). Otherwise, if you use some other method, you may prefer to link up idle, standing, and return to idle.

Re: Is Fallout / Skyrim / Dishonored style dialogue possible?

Posted: Wed Jul 04, 2018 10:39 pm
by SuperSal
I know, this might be the most annoying request you ever got..but if you can make a visual tutorial on all of this, it would really helpful. Because the date for submission and I'm panicking, when I'm panicking I can understand stuff

Re: Is Fallout / Skyrim / Dishonored style dialogue possible?

Posted: Thu Jul 05, 2018 8:39 am
by Tony Li
I'll see what I can do. If you can send me example FBX files with a model and animation, I'll use that. Otherwise I'll use stand-in assets.

Re: Is Fallout / Skyrim / Dishonored style dialogue possible?

Posted: Thu Jul 05, 2018 9:18 am
by SuperSal
Thanks, man...I'm still working on the model, it'll take a while to finish animating them..

Re: Is Fallout / Skyrim / Dishonored style dialogue possible?

Posted: Thu Jul 05, 2018 10:51 am
by SuperSal
Alright..I've found some of old samples....

https://drive.google.com/open?id=1Yy2S4 ... C2IhLE2MMX

It has two talking animations...so you can show me how to create one (talking / Answering Query) transition to another (talking / Answering Query) animation

Re: Is Fallout / Skyrim / Dishonored style dialogue possible?

Posted: Thu Jul 05, 2018 12:27 pm
by Tony Li
I think an example that you can play with will be more helpful: MuseumExample_2018-07-05.unitypackage

The example scene was made in Unity 2017.4.6, so you should use this version or higher (e.g., Unity 2018).

The scene has a Dialogue Manager prefab. I didn't customize the prefab except to add a dialogue database.

The player uses Unity's Standard Assets FirstPersonController. I don't know what kind of VR you're using, so I used the non-VR first person controller instead. I also added a Proximity Selector component so it can detect when it's near the statue. You may want to replace this with some kind of system that detects if the player bows in VR.

The scene has a GameObject named "Thor". Actually I named it "Thor ADDED TRIGGERS" to let you know that I added Dialogue System Triggers to it.

You used Mixamo animations. I renamed the clips and dropped them onto an animator controller canvas. The animator controller looks like this:

Image

"Thor" has a trigger collider:

Image

It also has these components:
  • Dialogue System Trigger: Set to OnTriggerEnter. It plays the sequence AnimatorPlay(standToSit).
  • Dialogue System Trigger: Set to OnTriggerExit. It plays the sequence AnimatorPlay(standToSit).
  • Usable: This tells the player's Proximity Selector that it can use this GameObject.
  • Dialogue System Trigger: Set to OnUse. It plays a conversation named "Thor".
I put an audio file named "thor.mp3" in a Resources folder. Then I wrote the conversation "Thor". It has one audio line:

Image

A second line just plays the "standToSit" animation.

There are many things you could do to polish this, but it should get the general idea across.

Re: Is Fallout / Skyrim / Dishonored style dialogue possible?

Posted: Thu Jul 05, 2018 1:31 pm
by SuperSal
First of all thank you for taking time out to explain...Now its making a lot of sense....Now I want to know how do I bring the UI with the list of the questions and lastly how will animation play when I select that question?