Page 1 of 1

How do I initiate conversation from script

Posted: Mon Sep 21, 2015 3:28 pm
by nishant
Hi ,
In the game that am working on , my NPC is an AI who constantly gives player info , warnings etc on specific events . I have a separate gameobject for AI and conversation trigger is attached to it. I want to know few things.

1. Can a conversation trigger handle multiple conversations ? Currently I am attaching multiple conversation scripts .
2. Is there any way to directly initiate a conversation from script of a different gameobject ? something similar to SendMessage ??

For #2 , currently I am attaching that conversation to a different gameobject and enabling that gameobject when I wish to start the conversation but I am sure there must be a better way.

By the way awesome work on the dialogue system. :D

Thanks.
Nishant

Re: How do I initiate conversation from script

Posted: Mon Sep 21, 2015 11:10 pm
by Tony Li
Hi,

This appear to be a duplicate post, but I wanted to answer the second half. (The first half is: Use DialogueManager.StartConversation().)

You can add multiple Conversation Triggers to a GameObject. Then you can set different Conditions so that only the appropriate one should run.