Deleting and unequipped a specific item from script

Post » Sat Nov 17, 2012 2:45 pm

Hi guys,

I've an item I explicitly created with placeatme(). I added it to the player's inventory using additem() and kept a pointer to it in some scripts. Strangely, when I later called delete() on that object, it never leaves the player's inventory. WHen I put it on the floor and tried again, the item still fails to be removed from the game. I also tried to have the player unequip it but still no deal.

Is there some way I can pull that off? My hunch is that additem() does add the item itself and not a copy of it because I did successfull get it to pull off a feedback through onequip().

Any ideas?
User avatar
D IV
 
Posts: 3406
Joined: Fri Nov 24, 2006 1:32 am

Post » Sat Nov 17, 2012 4:30 am

It's easiest to do it by making the "thing" a quest alias, then you can always remember it (while the quest is running) and do whatever you want with it.

What you want to do should work, so my guess is your reference is being lost before you try to delete/unequip?

What errors are you getting in your logfiles? That will tell you if you are trying to delete a reference that no longer exists ...
User avatar
Peter lopez
 
Posts: 3383
Joined: Mon Sep 10, 2007 5:55 pm


Return to V - Skyrim