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.

Make someone open a dialog with you when you enter an area.

Page: 1 of 1
 Mindtwistah
06-10-2007, 5:29 AM
#1
How do I make someone open a dialog with you when you enter an area?
 Pavlos
06-10-2007, 8:58 AM
#2
How do I make someone open a dialog with you when you enter an area?

A simple script such as the one below should do it when you place it in the correct field of the .are file for your module.

void main()
{
if (GetIsPC(GetEnteringObject()) && !GetLoadFromSaveGame() /*&& !GetGlobalBoolean("FooBar")*/)
{

AssignCommand(GetObjectByTag("RandomObject"), ActionStartConversation(GetFirstPC(), "my_dlg"));

}
}

If you set a global boolean then the dialogue will only trigger once - just remove the /* and the */ to uncomment it. Replace all the strings ("RandomObject", "my_dlg", "FoorBar") with the ones you intend to use :).

If this is for an already existing area then might I suggest "Injecting" the script (http://www.lucasforums.com/showthread.php?t=137370)?)
Page: 1 of 1