PDA

View Full Version : Make someone open a dialog with you when you enter an area.


Mindtwistah
06-10-2007, 05:29 AM
How do I make someone open a dialog with you when you enter an area?

Pavlos
06-10-2007, 08:58 AM
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)?