Jump to content

Home

Dialouge triggered by item


Tomb King

Recommended Posts

Originally posted by Tomb King

What script do you use to trigger dialouge when you get a certain item in your inventory?

 

ex. When you get the sword of Ajanta Pall, in K1, then there's dialogue to give the sword to Uthar.

 

In K2:TSL there is a script called "c_hasitem" that you can use to check if the player have an item.

 

Attach it to the Conditional script slot of the dialog node you wish to make available if the player has the item, and set the "String Param" for that script slot to the Tag of the item you wish to check for.

 

If you want to use it for KotOR(1) I don't know if there's a ready-made script coming with the game to use. But it's fairly easy to make your own. Create a script like..

 

int StartingConditional() {
   string sItemTag = "TAG_OF_ITEM_HERE";
   return GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), sItemTag));
}

 

...and put the tag of the item you want to check for where it says TAG_OF_ITEM_HERE. Then compile the script, put it in the Override folder and attach it to the Conditional script slot of the dialog node.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...