Hi!
Please try this updated scene:
AsakuExample_2018-02-14.unitypackage
It's MyTest / MyTestScene_edited_2018-02-14.
Asaku wrote: ↑Wed Feb 14, 2018 4:10 pm
I have done as you described but unfortunately I wasn't able to replicate the scene behavior. The subtitles do indeed change but the NPC name and Portrait don't.
This has to do with a sometimes confusing but useful feature of the Dialogue System that's detailed on this page:
How GameObjects Are Associated With Conversations. When you start a conversation at runtime, you can assign any GameObjects as the conversation's actor and conversant, even if they're not associated with the conversation's primary actor and conversant defined in the database. This is handy to reuse generic conversations for multiple NPCs.
In your conversation, the primary actor was set to Player, and the primary conversant was set to NPC1:
- Primary actor: Player
- Primary conversant: NPC1
You may have noticed in your database that half of the lines looked like "Hello there kind sir", while the other half looked like "
NPC2: Well hello there". This is because NPC2 was neither the primary actor nor the primary conversant, so NPC2 is treated like an additional, third participant.
To fix this, I clicked blank canvas space to inspect the conversation's properties. Then I changed the Actor dropdown from Player to NPC2. This means the conversation's primary actor is NPC2, and the primary conversant is NPC1.
Going back to the original issue, when the primary actor was set to Player, your button's "Start Conversation Script" called DialogueManager.StartConversation, passing NPC1 as the primary actor and NPC2 as the primary conversant. So at runtime the GameObjects being used were:
- Primary actor: Player (in database) --> NPC1 (in the active conversation)
- Primary conversant: NPC1 (in database) --> NPC2 (in the active conversation)
Anyway, to keep this from getting too long, the mismatch was the problem. By changing the conversation's primary actor to NPC2, the participants got connected to NPC actors. (They're actually swapped, where NPC1 ends up saying NPC2's lines and vice versa, but that's just a matter of swapping the assignments on the button.)
Asaku wrote: ↑Wed Feb 14, 2018 4:10 pm
This does not seem to always work. When I have an [em1] tag for example it ignores it.
I just updated the ActorSubtitleColor script. The previous version had a comment that it doesn't work with [em] or rich text codes, but better to just make it work with them.
The updated script is in the example package above, too.
For variety, in the very last line I used <i> (italics) tags instead of [em] tags.
Asaku wrote: ↑Wed Feb 14, 2018 4:10 pm
I was more thinking about actual voice acting over the writing.
I added an example to the scene. The third line uses the
AudioWait() sequencer command. When you get into voice acting, you may be interested in the pages on
entrytags and/or
lipsync.