Jump to content

Home

Script to fire a dialogue


Seamhainn

Recommended Posts

Hello!

 

I want to start a dialogue with a script via a trigger. I implemeted the trigger and have the dialogue file.

 

What I need is a script which starts the dialogue which will essantially be a little cutscene. This scene, of course, should only happen ones.

 

Thanks for any help!

Link to comment
Share on other sites

Attach this script to the OnEnter event and it will fire the dialog when you enter the trigger

 

void main() {

   object oPC = GetFirstPC();

   if (GetEnteringObject() == oPC)
           return;

ActionStartConversation(GetFirstPC(),"[b]Dialog_File[/b]");

   }
}

 

On the last possible node to be spoken, attach this script to the script that fires when node is spoken field.

 

void main() {


       object oTrigger = GetObjectByTag("[b]Trigger_Tag[/b]",0);

       DestroyObject(oTrigger, 0.0, 0, 0.0, 0);  

}

 

That should take care of both matters - hope this helps

 

--Stream

Link to comment
Share on other sites

Thank you!

 

I saw now that the dialog has the talktrue entry. By chance that solves the problem anyway. I'll keep you informed.

 

I have placed the trigger. Unfortunately I can't get the coordinates right. I want to have a rectangle 10 to 10 square. Which Values must I put into the four x, y, z coordinates?

 

Thanks and take care

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...