Jump to content

Looking for a "talked to such-and-such" condition


temnix

Recommended Posts

I would like to have a trigger in one NPC's conversation that registers whether I have talked to, that is, met, another NPC, in another area. I have tried it in the form of "TriggerOverride("scriptname",NumTimesTalkedTo(0))" for the negative condition and "TriggerOverride("scriptname",NumTimesTalkedToGT(0))" for positive, side by side in the same dialog. But neither appears, even though I made a point of assigning a script name to that NPC. So, is there a way to reflect an encounter? Besides putting a global in every branch of the NPC's conversation.

Link to post

I could set a global, but how would I do that for an existing dialogue? Rewrite every reply line's actions? The check in point is about meeting Volo - whether the party has spoken to him. The game is actually pretty loose with such things, information from Volo is labeled under "Rumor from Volo," even though he doesn't introduce himself. So I went about it this way also and just put the global in OnCreation() of the tavern's script. If they have been there, it can be assumed they talked to him. But I would like a real way to take account of an encounter. The TriggerOverride(NumTimes... works, by the way, but only if the NPC is in the same area as the speaker.

Link to post

TriggerOverride() doesn't work on objects not present in the active area. Worse, it doesn't return false either in such cases. And *worse yet*, it will even break OR() trigger if you put it in there as workaround, unless it goes the last in the entire condition section. From SoD's BDJAHEIR.D, this is how I managed to check that Jaheira is not inside of any Flaming Fist camps, without having to put dummy ff_camp region into each and every area:

IF ~IsValidForPartyDialog("khalid") OR(2) !Range("ff_camp",999) !TriggerOverride("ff_camp",IsOverMe("jaheira"))~

Changing the order of triggers would break it.

 

Better play it safe and just add SetGlobal() to the dialog. Or, as Jastey says, patch the script to set the var.

Link to post

How about a general patch? All dialogues get ADD_TRANS_ACTION setting a global, say, "MET%deathvar%" to 1. I see no harm in that. Anyway, that's just idle musing. Thanks for the answers.

Link to post
5 hours ago, temnix said:

How about a general patch? All dialogues get ADD_TRANS_ACTION setting a global, say, "MET%deathvar%" to 1. I see no harm in that. Anyway, that's just idle musing. Thanks for the answers.

Well, this is likely going to be really bad in the old non-EE engine, but otherwise you could work well.

Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...