jimbo32 Posted February 5, 2007 Share Posted February 5, 2007 Hey everybody, I'm in the process of creating a recruitment mod, and need some advice. What I'd like to do is remove an item from the party's inventory using a script attached to dialogue (if that's possible). This is to simulate "giving" the item to the new recruit, who will be equipped with it when joining. Any assistance would be appreciated. Link to comment Share on other sites More sharing options...
stoffe Posted February 5, 2007 Share Posted February 5, 2007 I'm in the process of creating a recruitment mod, and need some advice. What I'd like to do is remove an item from the party's inventory using a script attached to dialogue (if that's possible). This is to simulate "giving" the item to the new recruit, who will be equipped with it when joining. Do you want to move the item from the party inventory to the new recruit, or do you just want to delete the item from the party inventory? Both are possible to do. If you just want to delete it, you can use a script like this, set as action script on your dialog node: void main() { object oItem = GetItemPossessedBy(GetFirstPC(), "TagOfItem"); if (GetIsObjectValid(oItem)) DestroyObject(oItem); } Where you change TagOfItem to the Tag of the item you want to remove (this is set in the UTI template). Link to comment Share on other sites More sharing options...
jimbo32 Posted February 5, 2007 Author Share Posted February 5, 2007 Thanks a million stoffe. That's just what I need. Just for future reference, how does the script differ if you actually want to move the item? Link to comment Share on other sites More sharing options...
stoffe Posted February 5, 2007 Share Posted February 5, 2007 Just for future reference, how does the script differ if you actually want to move the item? You'd replace the DestroyObject() line with... ActionTakeItem(oItem, GetFirstPC()); ...provided that the conversation owner is the NPC who should receive the item. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.