Actor Name Question

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Actor Name Question

Post by nathanj »

Hi Tony,

Kind of a weird question here, but hopefully you can point me in the right direction (and also make sense of it :( )

I'm experimenting with DS and QM still and am trying to figure out the best way to organise my dialogue database while also keeping it as flexible as possible.

I'm managing all conversations through QM and calling upon the dialogue from the DS database. What I would like to do is have a bunch of generic headers like "Gatherer", "Hunter", "Crafter" etc as a way of organising all the conversations in the database (for example, "Gatherer/Raspberries/Assign").

Image

Because I plan to use this database in multiple projects I would like to assign the same conversations to different NPCs. I'm hoping that I can assign multiple NPCs to say the "Gatherer" actor label. I have assigned the conversations to the different types "Gatherer", "Hunter" etc and then assigned each type of character to those types of roles.

Image

All of the above appears to be working and I can assign the conversations to different characters. However, I have created a camera manager that auto assigns a suite of virtual cameras to the conversation actor. If the actors are uniquely assigned in the dialogue database and those match uniquely assigned Dialogue Actors for each NPC my camera system works. However, if I assign all gather conversations to the "Gatherer" actor in the Dialogue Database and then assign all the gather NPCs to the generic "Gatherer" actor then the cameras only snap to one of the NPCs (I believe this is the first one registered on start).

The code I use to grab the actors transform is simply:

Code: Select all

 public class VSDialogueCameraBasic : MonoBehaviour
    {

        public void OnConversationStart(Transform actor)
        {
            VSDialogueCameraManager.OnConversationStart(actor, transform);
        }

        public void OnConversationEnd(Transform actor)
        {
            VSDialogueCameraManager.OnConversationEnd(actor, transform);
        }

    }
Does this make sense? I get that this is way beyond the scope of DS and QM but I'm just wondering if you can point me in the direction of what might be causing this.

Thanks as always,
Nathan
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Actor Name Question

Post by Tony Li »

The trick is to not set the Dialogue Actor's Actor dropdown to Gatherer. Instead, set it to the NPC's Quest Giver > ID value. If your dialogue database doesn't have an actor with this name, you can enter it manually into the Dialogue Actor by clicking the circle button next to the Actor dropdown.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: Actor Name Question

Post by nathanj »

Brilliant! So simple!

Thanks Tony

Sorry for the delay in responding. Ran into a pretty significant issue with another asset that set us back a day.

Nathan
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Actor Name Question

Post by Tony Li »

Glad to help!
Post Reply