Miloch Posted December 13, 2007 Share Posted December 13, 2007 When run from CRE scripts, do these commands automatically put the item in the first available inventory slot, or what? Link to comment
DavidW Posted December 13, 2007 Share Posted December 13, 2007 When run from CRE scripts, do these commands automatically put the item in the first available inventory slot, or what? IIRC, CreateItem() actually puts the item in the Magic Weapon slot!... this caused a lot of problems in early versions of SCS, before I shifted to GiveItemCreate(). Link to comment
devSin Posted December 13, 2007 Share Posted December 13, 2007 I had a note of the funkiness with these somewhere (IESDP forum?) when we were all investigating. Basically, it fills from the bottom up (the magically-created weapon, as DavidW says) for NPCs; when used with PCs, it should fill from the top down (IIRC). TakePartyItem() follows the same rules. Link to comment
Miloch Posted December 14, 2007 Author Share Posted December 14, 2007 I found this. Basically, I want to have a cre take an item from a party if they have it and put it in the first available inventory slot. So it looks like I want to go with something like: IF PartyHasItem("myitem") THEN RESPONSE #100 TakePartyItem("myitem") DestroyItem("myitem") GiveItemCreate("myitem","mycre",0,0,0) END It's fine if it's stealable in this particular case. There are other items where I want the CRE to wear it actually, so I'm thinking TakePartyItem("myhelm") and FillSlot(SLOT_HELMET) should be fine for that. Except the IESDP entry for FillSlot() says it "will look for any items... in the inventory, and move the first it comes across..." into the slot. So does it matter if it's not in the inventory but in the magic weapon slot? Link to comment
Rabain Posted December 14, 2007 Share Posted December 14, 2007 I think FillSlot() is also destructive, in that it destroys the item in the slot you are trying to Fill...if there is something in the slot already. Link to comment
Miloch Posted December 14, 2007 Author Share Posted December 14, 2007 Yeah, that's fine in this case. I'm just wondering if it works on items that aren't technically in the inventory. Link to comment
Ascension64 Posted December 14, 2007 Share Posted December 14, 2007 Yeah, that's fine in this case. I'm just wondering if it works on items that aren't technically in the inventory. IIRC, that's how I do it in the BGT NPC transitions, so it should be fine. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.