Pocket Plane Group
Miscellany, Inc. => Infinity Engine Modding Q&A => Topic started by: Amazordra on March 22, 2005, 10:15:53 PM
-
Since I'm incredibly lazy and tired at the moment....
Does anyone know if it is possible to take a party item without the character taking the item being near whichever character has the item?
Gah, I hope that makes sense.
-
TakePartyItem()?
TakeItem()?
TakeItemReplace()?
DestroyItem()?
-
I thought a character had to be near the npc with the item for those to work. o.o
-
Beats me. Test it?
-
I doubt proximity matters, since characters aren't the only objects that can take items. You can use the same actions in an area script to strip a party of goodies, etc.
-
I haven't tested it myself yet, I'm not home long enough to do so. :'(
*explains a bit more about the problem* The reason why I wanted to know if it was possible to take an item without any distance restrictions (In my case, its two different characters in two different areas.) is because when an npc leaves the group, this npc drops an item into Player1's inventory and teleports somewhere else. *Why* this npc does so I cannot figure out (nothing in the coding mentions a "DropItem", "GiveItem", etc trigger... but the npc only leaves behind one item--not all of the items in the npc's inventory, so I figure it can't be because of the LeaveParty().... ), which means I have to find a way to reclaim the item that doesn't involve destroying it and creating another one.
-
It's probably flagged as a quest item. See: Flail of Ages. Unflag that.
-
The reason why I wanted to know if it was possible to take an item without any distance restrictions (In my case, its two different characters in two different areas.) is because when an npc leaves the group, this npc drops an item into Player1's inventory and teleports somewhere else. *Why* this npc does so I cannot figure out (nothing in the coding mentions a "DropItem", "GiveItem", etc trigger... but the npc only leaves behind one item--not all of the items in the npc's inventory, so I figure it can't be because of the LeaveParty().... )
Check the item to see if it's flagged non-sellable/quest-critical. That will cause an item to be shifted to Player1's inventory when the NPC previously holding it does a LeaveParty().
Urk! Ghreyfain beat me to this! Bah! Post anyway!
-
Yeah, I did indeed flag it as unsellable.
(D'oh! *smakes self*)
Thank you both for the help, you've just spared me many hours of scripting. :)