afftor Posted March 7, 2013 Share Posted March 7, 2013 (edited) Reveal hidden contents Scriptname Loot extends ReferenceAlias Conditional Message Property Breakdown AutoMiscObject Property OreIron AutoKeyword Property VendorItemArmor AutoKeyword Property VendorItemWeapon AutoKeyword Property VendorItemClothing AutoQuest Property start Auto Event OnInit()Debug.Notification("whatever")endEvent Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)If (akSourceContainer As Actor).IsDead() == 1If akBaseItem.HasKeyword(VendorItemArmor) || akBaseItem.HasKeyword(VendorItemWeapon) || akBaseItem.HasKeyword(VendorItemClothing)Game.GetPlayer().RemoveItem(akItemReference, 1, true)Game.GetPlayer().AddItem(OreIron, 2)Breakdown.Show()elseDebug.Notification ("Wrong item")EndIfelseDebug.Notification ("wrong container")EndIfEndEvent I made this script to check whenever player picks up a piece of equipment from dead enemies to break it down for resources. However only If (akSourceContainer As Actor).IsDead() == 1 line actually works, all checks fails, even If I delete every check only debug messages show up, items are never tracked or added. I suspect this might be a case of ReferenceAlias, but I have no real knowledge on this extension. Edited March 7, 2013 by afftor Link to comment Share on other sites More sharing options...
Recommended Posts