The Black Wyrm's Lair - Forums

Mod development resources & discussion => Modder's Workshop => Topic started by: jastey on February 10, 2005, 11:54:18 AM

Title: how to let item disappear
Post by: jastey on February 10, 2005, 11:54:18 AM
Hi all,
is there a way to let an item disappear, that is somewhere in the game - on the floor, to be precise, with not known coordinates?

"PickUpItem(XX)" - only works if the character is standing on the item
"DestroyItem(XX)" - only works for items in the inventory.

I need to remove an item from the game, but I have no idea where it could be (where the player left it.)

I fear it's not possible. Ideas anyone?
Thanks.
Title: how to let item disappear
Post by: egm on February 10, 2005, 01:19:34 PM
I think it's possible with script: "169 DestroyItem(S:ResRef*)" This action is used in a area script: the description says that it removes the item specified by ResRef from the object running the script (for your matter, an area).
i don't know if it deals with items on ground or in container...
Title: how to let item disappear
Post by: jastey on February 10, 2005, 01:30:13 PM
I tried it in an area script but it didn't work... So I thought at least, but I will try again tonight. I started to fiddle around using invisible helpers that were of no use... It would be great if what you said would work.

Now I remember: It didn't work. It left an "the party lost an item" (without really one taken away though), but the item on the ground was still laying there. Sounds weird. I'll have to check that again.
Title: how to let item disappear
Post by: egm on February 10, 2005, 03:05:02 PM
I think it's a flaw in the IE: when there's a quest that require to remover an item from the party inventory, you can drop it on the ground and the engine can't deal with it...

Why do you need this feature?
Title: how to let item disappear
Post by: igi on February 10, 2005, 04:14:58 PM
I doubt it's possible without some nifty work-around.
You could detect the fact the item is no longer in the inventory, create an invis creature (hopefully right next to the item), pick it up, and set the creature anim to be the ground anim of the object.
Or dont let the item be dropped, except via dialog (in which case, I will cry).
Or, for an insane approach, when you detect the item is no longer in the players possession, MoveGroundPiles to some out-of-reach area.
Or, once you decide the item should be 'gone', set a global. When the player possess the item again, use the global to TakeItemReplace it with some mystical ash or something, all that remains of the object.
Or something.
Title: how to let item disappear
Post by: jastey on February 10, 2005, 04:15:01 PM
egm: You are right! This is one of the cheat "advices" you read for some occations. Damn...  <_< So I guess I can forget this idea..

I wanted to use it for my BGII-NPC mod, where I wanted to ensure that special items disappear after a character said that he will take care of that - but the items are laying at places I can't define in advance (and even if I would, I could never be sure the player didn't put them somewhere else), so this won't be working then...
Title: how to let item disappear
Post by: jastey on February 10, 2005, 04:21:40 PM
I didn't see your post, igi.

Not making the item dropable: I would hate the modder for that... ;)

What do you mean by "set the creature anim to be the ground anim of the object"?

"MoveGroundPiles to some out-of-reach area." Is that possible, if I don't know where the pile is?
Title: how to let item disappear
Post by: Avenger_teambg on July 23, 2005, 07:17:09 PM
MoveGroundPiles transfers all pile type containers (ie: dropped items).
I would try to use movegroundpiles with a nonexisting area :)