Jump to content

Home

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


Mindtwistah

Recommended Posts

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?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...