If you need an NPC to quit after leaving an area:
1) Set a Global in the override that describes that there is something a-foot
2) make a check of the area
3) Set another Global
4) Initiate Quitting dialogue/or Quit and do moving sequence in the dialogue file (or via script if she does not say anything)
ie your override BAF will say something like:
IF
InParty(Myself)
AreaCheck(FWXXXX")
Global("WeAreInAreaFWXXXX","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("WeAreInAreaFWXXXX","GLOBAL",1) //that will tell the game that we entered the zone where something is gonna happen
END
//now leaving itself:
IF
InParty(Myself)
!AreaCheck(FWXXXX")
Global("WeAreInAreaFWXXXX","GLOBAL",1)//these two indicate that you went into the area with the NPC and left it with the NPC
THEN
SetGlobal("WeAreInAreaFWXXXX","GLOBAL",2)
Dialogue(Player1) //that will start the dialogue after you had left the area with the NPC in the party
END
In XXXXJ.D file:
IF ~Global("WeAreInAreaFWXXXX","GLOBAL",2)~
SAY ~Hey, ya, <CHARNAME>, I am going BACK!~
IF ~~ THEN DO ~SetGlobal("WeAreInAreaFWXXXX","GLOBAL",3) LeaveParty() ActionOverride("NPCDeathVariable",LeaveAreaLUA("FWXXXX","",[x.y],3))~ EXIT
END
or any other moving mechanism (MoveGlobal etc)...
If the same vein, how would I make it so that the NPC would initiate dialogue and leave immediately after a certain quest was completed? I'm guessing it'd be by using Shadowkeeper or some such to find the variable I want and setting a trigger for that . . . but what would that trigger *be* exactly?The same way: find the Global that sets itself after finishing that Quest and do scriot that have IF condition that Global and sets a new Global for you, than initiates a dialogue; D file will have block depent on global ie...
IF
InParty(Myself)
Global("ThatQuestIsComplete","GLOBAL",1)
Global("NPCReactsOnQuest","GLOBAL",0)
THEN
RESPONSE #100
Global("NPCReactsOnQuest","GLOBAL",1)
Dialogue(Player1)
END
etc.
Hope that helps and mine recipy aren't the one for disaster