Add conversation action through script
Posted: Sat Jun 05, 2021 7:08 am
This is my third question, my heart hurts a little every time I need to ask something, you are amazing Tony but I can only imagine how busy you are answering so many messages, thank you for the amazing customer service!
I'm doing some Automation and I need to get my script to add a conversation action automatically, so basically I need it to have the same effect of pressing "Add action" and selecting "Start Conversation" in the conversation trigger, I have everything else up and running and it works fine, just can't figure out how to get an action to work, if it helps the code that I'm missing would be replacing this comment:
I'm doing some Automation and I need to get my script to add a conversation action automatically, so basically I need it to have the same effect of pressing "Add action" and selecting "Start Conversation" in the conversation trigger, I have everything else up and running and it works fine, just can't figure out how to get an action to work, if it helps the code that I'm missing would be replacing this comment:
Code: Select all
private void PrepareCollectableDialog()
{
DialogSystem = GetComponent<DialogueSystemTrigger>();
CollectableActor = DialogueManager.masterDatabase.actors.SingleOrDefault(x => x.Name == InterfaceName.COLLECTABLE_ACTOR);
CollectableConversation = DialogueManager.masterDatabase.conversations.First(x => x.ActorID == CollectableActor.id);
DialogSystem.trigger = DialogueSystemTriggerEvent.OnUse;
//Here I need to add a 'start conversation' so I don't need to do it manually
DialogSystem.conversation = CollectableConversation.Title;
}