Posted by: Bons
« on: April 18, 2004, 10:25:26 AM »Would you also need to use WEIGHTS in this situation?
Off the top of my head, no. If the villain NPC has the first line, you'd script them to initiate dialogue with the NPC, and the conditions you use should handle it. The code would look something like this (Something, because I can always be wrong, wrong, wrong. ):
In your villain's script:
IF
Global("VillainNPC1", "LOCALS", 0)
See("NPC")
InParty("NPC")
THEN
RESPONSE #100
StartDialogueNoSet("NPC")
END
In your .d for the villain:
BEGIN ~VILLAIN~
CHAIN
IF ~
Global("VillainNPC1","LOCALS",0)
InParty("NPC")
See("NPC")
!StateCheck("NPC",STATE_SLEEPING)~ THEN VILLAIN YouMustPayTheRent
~You must pay the rent!~ DO ~SetGlobal("VillainNPC1","LOCALS",1)~
==NPCJ
~I can't pay the rent!~
==VILLAIN
~You must pay the rent!~
==NPCJ
~I can't pay the rent!~
==VILLAIN
~You must pay the rent!~
END
++ ~I'll pay the rent!~ GOTO Curses
IF ~~ THEN BEGIN Curses
SAY ~Curses! Foiled again!~
IF ~~ THEN DO ~Enemy()
Attack([PC])~ EXIT
END
If the shoe were on the other foot, and the NPC called out to the villain first, then a WEIGHT might be necessary to insure the desired line of dialogue appears.