Add object reference to environment via papyrus

Post » Mon Feb 18, 2013 1:19 pm

I'm trying to be able to add an item to the world through papyrus with this script"

Spoiler
Scriptname DWRHVNItemHolderScript extends ObjectReference  Int Property ItemCount  Auto  ObjectReference Property ItemAddedORef  Auto  ObjectReference Property ItemDisplayMarker1  Auto  Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)	ItemCount+=1	ItemAddedORef=akItemReferenceendEventEvent OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)	ItemCount-=1endEventEvent OnClose(ObjectReference akObjectReference)	If(ItemCount > 1)		;Player must remove items	Else		;Display Item		;ItemAddedORef.SetPosition(-6269,-1723,100)		;ItemAddedORef.MoveTo(ItemDisplayMarker1)	EndIfEndEventEvent OnCellAttach()	;ItemAddedORef.Enable()	;ItemAddedORef.MoveTo(ItemDisplayMarker1)EndEvent

The commented out bits haven't worked (if you could already guess), so I can't figure out how to make this happen. I'd also like to avoid any SKSE scripts if I can help it.
User avatar
Daddy Cool!
 
Posts: 3381
Joined: Tue Aug 21, 2007 5:34 pm

Return to V - Skyrim