View Single Post
Old 01-26-2012, 02:00 PM   #69
Qui-Gon Glenn
Necessary Roughneck
 
Qui-Gon Glenn's Avatar
 
Join Date: May 2007
Location: Thessia
Posts: 1,467
Current Game: ME3MP, Arkham Origins
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):
Code:
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?
Qui-Gon_Glenn on the software of which we shall not name.... add me and the enemy shall fall in chunks of crimson salsa

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