I'm looking to implement a generic "Thank You" conversation/node where the dialogue node's actor & conversant is set to "(None)".
I can't figure out how to programmatically start a conversation with the Conversation/DialogueEntry having the right Actor. This would need to be done before the sequence for the DialogueEntry is played.
In order, my goal is this:
1. Start conversation
2. Set Actor field on the first Dialogue Entry with an ActorID (not a transform).
3. Enter the node, and have the default sequence on my DialogueManager run.
Programatically setting DialogueEntry field before the sequence is run
Re: Programatically setting DialogueEntry field before the sequence is run
Hi,
Does it need to be set to (None)? At runtime, you can use a different actor for the conversation's primary actor or primary conversant. See: Character GameObject Assignments
The example used in that link is a general-purpose shopkeeper conversation that any number of shopkeeper NPCs can use.
Does it need to be set to (None)? At runtime, you can use a different actor for the conversation's primary actor or primary conversant. See: Character GameObject Assignments
The example used in that link is a general-purpose shopkeeper conversation that any number of shopkeeper NPCs can use.
Re: Programatically setting DialogueEntry field before the sequence is run
Hi Tony,
It can be set to anything that gets the job done. Unfortunately, the "Generic Shopkeeper" example doesn't work for me, because I'd like to start this conversation purely from code instead of a DialogueSystemTrigger. To do so, I think I need to prepare the conversation actor beforehand with an actorID.
I know it's not how it works, but my ideal script would look like this:
or
It can be set to anything that gets the job done. Unfortunately, the "Generic Shopkeeper" example doesn't work for me, because I'd like to start this conversation purely from code instead of a DialogueSystemTrigger. To do so, I think I need to prepare the conversation actor beforehand with an actorID.
I know it's not how it works, but my ideal script would look like this:
Code: Select all
DialogueManager.GetConversation(conversationId).SetActorId(actorId);
StartConversation(conversationId);
Code: Select all
StartConversation(conversationId, actorId);
Re: Programatically setting DialogueEntry field before the sequence is run
You can start it from code just as easily. Pass the GameObject transforms to DialogueManager.StartConversation():
Code: Select all
DialogueManager.StartConversation(conversationTitle, actorTransform, conversantTransform);