Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

[Modding Question] Instant dialog when enter module.

Page: 1 of 1
 Nick Vader
10-28-2009, 6:52 AM
#1
When the pc enters a module (eg: Endar Spire), how can I get the pc to instantly start a dialog with an npc (eg: Trask, with TagResRef: trask)?

Please post answers as I leave my work in the middle waiting for answers...

Thank you.

Nick-Vader.
 Canderis
10-28-2009, 7:27 AM
#2
In the onenter slot for the module. It can be found in the ARE file.

You put in a script like:

void main() {
object oNPC=GetObjectByTag("npc_tag");
location lMe=GetLocation(GetFirstPC());
ActionDoCommand(SetCommandable(TRUE,oNPC));
AssignCommand (oNPC,ActionForceMoveToLocation(lMe,FALSE));
AssignCommand (oNPC, ActionStartConversation(GetFirstPC()));
}

In than npc's utc file put in the name for the dialog in the conversation slot.
 Nick Vader
10-28-2009, 7:41 AM
#3
In the onenter slot for the module. It can be found in the ARE file.

You put in a script like:

void main() {
object oNPC=GetObjectByTag("npc_tag");
location lMe=GetLocation(GetFirstPC());
ActionDoCommand(SetCommandable(TRUE,oNPC));
AssignCommand (oNPC,ActionForceMoveToLocation(lMe,FALSE));
AssignCommand (oNPC, ActionStartConversation(GetFirstPC()));
}

In than npc's utc file put in the name for the dialog in the conversation slot.

Thnx. I thought I'd have to wait for days to get an answer !:thmbup1:
Page: 1 of 1