View Single Post
Old 01-26-2012, 01:00 PM   #69
Qui-Gon Glenn
@Qui-Gon Glenn
Digory Kirke's Bafflement
Qui-Gon Glenn's Avatar
Join Date: May 2007
Location: Irune
Posts: 1,492
Current Game: KotOR awww yeah
Folder extraordinaire  Helpful!  Forum Veteran  Veteran Modder 
Ok... I don't have time to give you a whole lot here, DJW, but the good news is TimBob12 has a great tutorial on conditional scripts that will help you here.

It is certainly possible to check if an NPC or the PC has a certain item equipped, and probably but not certain (for me) you can check if it is in the PC inventory period.

Think about the steps.

1. You need to "get" the individual in question.

2. You need to check for the item on said individual.

3. You need to return the value to the dialog to open or close the branch in question.

so, off the top of my head, and I may improve this later at a real PC with KTool, but... and I bet there is an in-game function for this so that we don't have to create one (came to me as I wrote my "name" for the conditional function, and it seemed oddly familiar):
int GetHasEquipped() 
   object oPC = GetObjectByTag(yourNPCtag);

   if GetItemPossessedBy(oPC,yourItemToBeFoundtag)
      return 1;
That might work, or something along those lines. KotOR Tool itself has a helpful script editor search window that you can just randomly type words into, like "equip" "item" "has" etc.... never know what that can bring up

As to the goodbye function... dunno... Never looked at it. Guess I'm curious though, so I will look at it. EDIT: goodbye "function". What are you referring to? is it a script in-game? There is no function in nwscript called "goodbye"

Want to play a game of ME3MP?

Last edited by Qui-Gon Glenn; 01-26-2012 at 01:11 PM.
Qui-Gon Glenn is offline   you may: quote & reply,