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;
}