Talk:Drop

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

In conjunction with GetFirstRef, this function might be used for a way to walk through individual items in an inventory. Drop the item, then use GetFirstRef to get the dropped item/stack's reference. Make sure to pick up the items with an Activate after manipulating the items, to keep the item's script from running. If I'm not mistaken, this is effectively how RefStuff works, but doesn't require the plug-in. This still has the same limitations as RefStuff, mainly that not every function has been modified to work on references (i.e., SetEquippedWeaponPoison).--Haama 13:24, 2 June 2008 (EDT)

Drop compared to just dropping[edit source]

The article does not answer the following questions;

  • Is the item's health/script vars/etc preserved when it is dropped?
  • Under what conditions is the item's onDrop block called/not called?

--ABO 15:45, 1 February 2009 (EST)

According to the article, it would appear that the answers are "yes" and "never?" - the latter seems uncertain, however. But I'm basing this entirely on the article that you claim does not answer those questions, a statement which confuses me since I see both issues addressed in the Note section...
Dragoon Wraith TALK 19:01, 1 February 2009 (EST)
Nevermind, that was a recent edit by Haama, presumably in response. I may have ninja'd him.
Dragoon Wraith TALK 19:02, 1 February 2009 (EST)
I have found that item vars are not preserved when Drop is used. I have only tested this for Health and Enchantment Charge and may run a more comprehensive test if I get the time.
Horny Quintus 10:10, 2 March 2009 (EST)
Confirmed for health, enchant charge and script variables. Tested with a Goblin Shaman Staff, Rough Leather Boots, and the Amulet of Kings (after equipping to set the pTempRef variable). Also tested with a cloned Amulet of Kings. Should also note that these tests were done with v1.2.0416.
--Haama 17:25, 31 March 2009 (EDT)

Reference to the Dropped Item ?[edit source]

How do I get an reference to an item being dropped from an actor ? -- shademe 05:22, 13 September 2008 (EDT)

With OBSE, you could use GetFirst/NextRef to find it. Otherwise... I don't think there is any good way to do so.
Dragoon Wraith TALK 09:31, 13 September 2008 (EDT)