Jump to content

Home

Dialogue the NPC way


shamelessposer

Recommended Posts

For n.1 just make a dialogue with an entry and no reply.

 

For no. 2, you have to use conditional scripts. Kotor doesn't use time but rather events such as plot advancement or leveling up per example.

 

Let's say you'd like a dialogue to become available only if Juhani is a party member, your PC is at least lvl 12, has at least 15 in demolition skill, is on Korriban, has dicovered 4 Star maps and has either a dealy plasma mine or a deadly gas mine in his inventory (I tried to put a lot of things in the example so it is more likely you will find something you are looking for in there). You would need a script like this:

 

int StartingConditional()
{
   object oPC= GetPCSpeaker(); 

   int nLevel = GetHitDice(oPC);
   int nSkill = GetSkillRank(SKILL_DEMOLITIONS, oPC);
   int nPlanet = GetGlobalNumber("K_CURRENT_PLANET");
   int nPlot = GetGlobalNumber("K_STAR_MAP");
//insert item resref
   object oMine1= GetItemPossessedBy(oPC, "G_I_TRAPKIT009");
   object oMine2= GetItemPossessedBy(oPC, "G_I_TRAPKIT012");


   if ((IsNPCPartyMember(NPC_JUHANI) == TRUE) && (nLevel >= 12) && (nSkill>= 15) && (nPlanet == 30) && (nPlot == 40) && ((GetIsObjectValid(oMine1)) || (GetIsObjectValid(oMine2))))

   {
       return TRUE;
   }
   return FALSE;
}

 

I understand this is for K1, so for the star maps and planets globals, check k_qa.nss :)

 

You'll find more in this post: http://www.lucasforums.com/showthread.php?p=1903207#post1903207

 

This overview of scripting syntax may also be useful: http://www.lucasforums.com/showthread.php?t=143390

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...