Making an NPC Leave . . .
#1
Posted 24 November 2004 - 05:34 PM
In the same vein, how would I make it so that the NPC would initiate dialogue and leave immediately after a certain quest was completed?
Thanks for any help.
Phenalope - When you just need a hug or a hamstring cut. A Baldur's Gate 2 NPC Friendship Mod. Because not everyone wants to get into your heroic britches.
"I was like a poor sinner who'd just found out he'd got to heaven after all."
~ Preacher
#2
Posted 26 November 2004 - 03:15 PM
IF
Global("QuestDone","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("QuestDone","GLOBAL",2)
StartDialogueNoSet(Player1)
END
And in her J file you would have this:
IF ~Global("QuestDone","GLOBAL",2)~ THEN BEGIN QuestDoneChat
SAY ~I'm really glad our quest is done.~
IF ~ DO~ SetGlobal("QuestDone","GLOBAL",3)~
EXIT
END
Or something like that.
For the other, you can script in an area check in her .baf, something like:
IF
!AreaCheck("ARxxxx")
THEN
RESPONSE #100
LeaveParty()
END
This would just cause her to stand around, or worse, trigger her standard booted dialogue, but you could put extra dialogue in her P file to cover this contingency.
Sorry about the vagueness, but my computer is being a pain, and I have to go bake 17 pies.
Sillara
Edit: Yes, SConrad is right. It is easier to do it via the dialogue script, the J file for preference. Use that code!
Edited by Sillara of the Tamari, 27 November 2004 - 02:02 AM.
#3
Posted 26 November 2004 - 03:31 PM
If you wanted him/her to initiate a dialogue, I would rather do this:For the other, you can script in an area check in her .baf, something like:
IF
!AreaCheck("ARxxxx")
THEN
RESPONSE #100
LeaveParty()
END
This would just cause her to stand around, or worse, trigger her standard booted dialogue, but you could put extra dialogue in her P file to cover this contingency.
IF
!AreaCheck("ARxxxx")
THEN
RESPONSE #100
StartDialogNoSet(Player1)
END
and then have the LeaveParty() in the dialogue. It's safer, smarter and easier.
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner