234ab said:
No, no, how can I make, to load a similar conversation, I thought is a trigger, don't you?
Yes, a trigger. You need to enable the trigger to get it to work. You can have the trigger enabled when you create it if Geralt won't be going to that place until the conversation is supposed to start. If the trigger is in a place that Geralt could go to before the conversation should start, then you need to run a small script to enable the trigger when it's time for the conversation.
Then of course you need to have the trigger call a script that starts the conversation. Here's an example of a script I used in "Medical Problems 2" to get Zoltan to start a conversation with Geralt when Geralt entered Royce Armstrong's house:
#include "inc_dialog"
void main()
{
object oZoltan = GetStoryNPCObject("ck_npc_zoltan");
if (GetEnteringObject() == GetFirstPC()) {
EnableTrigger(GetObjectByTag("ck_roycehome"),FALSE);
DelayCommand (2.0, TeleportAndTalk(oZoltan));
}
}
You have to start with
#include "inc_dialog" if you're using the script to start a conversation.
The line
object oZoltan = GetStoryNPCObject("ck_npc_zoltan"); is used to specify that it is Zoltan who will be doing stuff later on in the script. This format is for characters that have story NPC files. If a character doesn't have a story NPC file, then you'd use GetObjectByTag instead of GetStoryNPCObject. That
ck_npc_zoltan is the file name of the NPC story file for that character, and of course you can have any oObject name you want.
The
if (GetEnteringObject() == GetFirstPC()) is to make sure that the trigger will only fire when GERALT enters it; if you don't have that line, then an NPC could make the trigger fire.
The
EnableTrigger(GetObjectByTag("ck_roycehome"),FALSE); line is to turn the trigger off after it has been used for the first time; if you don't turn it off, then the conversation might start all over again as soon as you finish it the first time.
TeleportAndTalk(oZoltan); makes Zoltan go to Geralt and begin a conversation. If you want to specify a particular conversation file that he will use, you can include that. If you don't specify a conversation file, then the character will use whichever conversation file is active during this phase of the game.
TeleportAndTalk moves the NPC to the player and starts the conversation. There's also
TeleportPCAndTalk, which moves the player to the NPC. They both start conversations; which one you use depends on where you want the player and the NPC to be when the conversation is over.
I put
DelayCommand (2.0, before the Teleport command so that the player would have a couple of seconds to see that Geralt had entered the house before the conversation started. If you want the conversation to start right away, then you leave that out. If you do use a DelayCommand, you can put in any number of seconds you want where I have the 2.0.
You can read more about the TeleportAndTalk command on this page of the Djinni Wiki: http://djinni.wikia.com/wiki/TeleportAndTalk