Masterofnet Posted January 20, 2015 Share Posted January 20, 2015 (edited) Scriptname DropIt extends ObjectReference Armor Property AR Auto Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) Actor PlayerRef = Game.GetPlayer() If PlayerRef == akNewContainer PlayerRef.DropObject(Self) EndIf EndEventWhy is the game ignoring Self??? When I replace Self with Ar it works. I have tried Self.GetBaseObject(). Does anyone know? Edited January 20, 2015 by Masterofnet Link to comment Share on other sites More sharing options...
lofgren Posted January 20, 2015 Share Posted January 20, 2015 You can't reference "self" on an item as long as it is in an inventory. You have to pass the base object as a property. Basically as long as an item is in an inventory it's just an entry in a list, not an object with a "self." Of course it's more complicated than that, but that's the quick and dirty way to think about it. Link to comment Share on other sites More sharing options...
Terra Nova Posted January 20, 2015 Share Posted January 20, 2015 You also aren't doing anything with your property. Link to comment Share on other sites More sharing options...
Masterofnet Posted January 20, 2015 Author Share Posted January 20, 2015 Ya I simplified the script. It is used in the real script. If you don't use that in the script it will cause problems? Thanks Link to comment Share on other sites More sharing options...
Arocide Posted January 20, 2015 Share Posted January 20, 2015 (edited) Objects inside inventories as far as I know don't have a sense of self (or as least as far as papyrus is concerned) when it comes to object references unless a quest is referencing them in an alias. If this is for just a single specific instance of an item you could probably use a quest alias to allow this to work, if it's for all objects of that base type you will have to place this on that specific form and use a property pointing to the armor form. Edited January 20, 2015 by Arocide Link to comment Share on other sites More sharing options...
Recommended Posts