You'll typically also want to set a boolean on the trigger, or destroy it after it has triggered, assuming it is intended to be a one-and-done event. Alternative options include checking the creature or object that is assigned the conversation for a boolean, or checking a global boolean/number, as appropriate.
Here's one example:
#include "k_inc_utility"
int HasNeverTriggered() {
int bReturn;
if (UT_GetPlotBooleanFlag(OBJECT_SELF, SW_PLOT_BOOLEAN_01) == FALSE)
{
bReturn = TRUE;
UT_SetPlotBooleanFlag(OBJECT_SELF, SW_PLOT_BOOLEAN_01, TRUE);
}
return bReturn;
}
void Main() {
object oDLGOwner = GetObjectByTag("DLGOwner");
object oEntering = GetEnteringObject();
if (GetIsPC(oEntering) && HasNeverTriggered())
{
AssignCommand(oDLGOwner, ActionStartConversation(GetFirstPC(), "DLGString"));
}
}
You can also cut out the middle-man and just do it like this:
void Main() {
object oDLGOwner = GetObjectByTag("DLGOwner");
object oEntering = GetEnteringObject();
int SW_PLOT_BOOLEAN_01 = 0;
if (GetIsPC(oEntering) && !GetLocalBoolean(OBJECT_SELF, SW_PLOT_BOOLEAN_01))
{
SetLocalBoolean(oTarget, OBJECT_SELF, SW_PLOT_BOOLEAN_01);
AssignCommand(oDLGOwner, ActionStartConversation(GetFirstPC(), "DLGString"));
}
}