I just added an encounter to an area using a normal Encounter Trigger. I just want this encounter to happen when a certain thing has been done in the journal. So I added a script at the OnEnteredScript looking like this:
void main()
{
object oPC = GetEnteringObject();
if(!GetIsPC(oPC)) return;
int nInt=GetLocalInt(oPC,"NW_JOURNAL_ENTRYq_summon");
if (nInt <31) return;
}
This, I suppose, works just like if you were to put a script in the OnEnter of a New Generic Trigger right? Or do you have to treat Encounters differently as supposed to other Triggers?
// Place this on the encounter's OnEnter event.
// Set the encounter's "Active" flag to FALSE.
void main()
{
object oPC = GetEnteringObject();
if (GetIsPC(oPC) && GetJournalEntry("q_summon", GetFirstPC()) > 30)
{
SetEncounterActive(TRUE);
TriggerEncounter(OBJECT_SELF, oPC, 0, -1.0f);
}
}
I don’t think that will work. At least in NWN1 it won’t. You need to make the encounter active prior to player stepping into it - that means in the moment player gets that quest update.