VanKrill Posted June 16, 2017 Share Posted June 16, 2017 You need to declare a property variable for your armor piece. The modified script is as follows Scriptname IronHookEquipScript extends ObjectReference Actor Property PlayerREF Auto Armor Property IronHook Auto Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) If akNewContainer == PlayerREF PlayerREF.EquipItem(IronHook, true, true) EndIf EndEvent Be sure to fill your properties after you compile your script else it won't do anything. However, since this script is on the object itself... There is one trick you can do which will remove the need for that property. Scriptname IronHookEquipScript extends ObjectReference Actor Property PlayerREF Auto Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) If akNewContainer == PlayerREF PlayerREF.EquipItem(Self, true, true) EndIf EndEvent You can use Self to refer to the object running the script. Provided that object is a CK object or placed reference. Aliases on quests can't use Self directly, they need to get their reference. But I'm getting ahead of what you need to know. Thank you! This example helped solve a problem I was working on. - Link to comment Share on other sites More sharing options...
Recommended Posts